From 93d717e2edb2de0cd383ab7f5cca481258373f39 Mon Sep 17 00:00:00 2001 From: EV Date: Sun, 23 Jun 2019 12:42:46 +0200 Subject: [PATCH] solve #86 --- lib/pouch-utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/pouch-utils.js b/lib/pouch-utils.js index 021b8cb..cc0da87 100644 --- a/lib/pouch-utils.js +++ b/lib/pouch-utils.js @@ -1,6 +1,7 @@ 'use strict'; -var Promise = require('pouchdb-promise'); +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } +var Promise = typeof Promise === 'function' ? Promise : _interopDefault(require('pouchdb-promise')); /* istanbul ignore next */ exports.once = function (fun) { var called = false;