diff --git a/src/wkd.js b/src/wkd.js index 39a90ea1..9a161ebd 100644 --- a/src/wkd.js +++ b/src/wkd.js @@ -31,7 +31,7 @@ import * as keyMod from './key'; * @constructor */ function WKD() { - this._fetch = typeof global !== 'undefined' ? global.fetch : require('node-fetch'); + this._fetch = typeof global.fetch === 'function' ? global.fetch : require('node-fetch'); } /**