Skip to content

Commit 575a525

Browse files
committed
fix
1 parent 190e033 commit 575a525

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/dbauth/cloudant.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,13 @@ function getSecurityUrl(db) {
128128

129129
function getBaseUrl(db) {
130130
if (typeof db.getUrl === 'function') { // pouchdb pre-6.0.0
131-
return urlParse(db.getUrl()).origin;
131+
// console.log("db.getUrl() = " + JSON.stringify(db.getUrl()));
132+
return db.getUrl();
132133
} else if (db.__opts && db.__opts.prefix) { // PouchDB.defaults
134+
// console.log("db.__opts.prefix = " + JSON.stringify(db.__opts.prefix));
133135
return db.__opts.prefix;
134136
} else { // pouchdb post-6.0.0
137+
// console.log("urlParse(db.name(" + db.name + ")).origin = " + JSON.stringify(urlParse(db.name).origin));
135138
return urlParse(db.name).origin;
136139
}
137140
}

0 commit comments

Comments
 (0)