We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 190e033 commit 575a525Copy full SHA for 575a525
lib/dbauth/cloudant.js
@@ -128,10 +128,13 @@ function getSecurityUrl(db) {
128
129
function getBaseUrl(db) {
130
if (typeof db.getUrl === 'function') { // pouchdb pre-6.0.0
131
- return urlParse(db.getUrl()).origin;
+ // console.log("db.getUrl() = " + JSON.stringify(db.getUrl()));
132
+ return db.getUrl();
133
} else if (db.__opts && db.__opts.prefix) { // PouchDB.defaults
134
+ // console.log("db.__opts.prefix = " + JSON.stringify(db.__opts.prefix));
135
return db.__opts.prefix;
136
} else { // pouchdb post-6.0.0
137
+ // console.log("urlParse(db.name(" + db.name + ")).origin = " + JSON.stringify(urlParse(db.name).origin));
138
return urlParse(db.name).origin;
139
}
140
0 commit comments