Skip to content

Commit

Permalink
fix: don't update design doc if custom is absent
Browse files Browse the repository at this point in the history
  • Loading branch information
cheminfo-bot committed Sep 2, 2016
1 parent 0dff073 commit 21ac98a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -912,7 +912,7 @@ async function checkDesignDoc(db, custom) {
}
if (
(!doc.version || doc.version < constants.DESIGN_DOC_VERSION) ||
(custom && (!doc.customVersion || doc.customVersion < custom.version))
(custom && typeof custom.version === 'number' && (!doc.customVersion || doc.customVersion < custom.version))
) {
debug.trace('design doc needs update');
return await createDesignDoc(db, doc._rev, custom);
Expand Down

0 comments on commit 21ac98a

Please sign in to comment.