fix: forgot can-promise replacement

This commit is contained in:
Ryan Day 2018-11-05 10:06:00 -08:00
parent be9fce3185
commit 25144450d7

7
lib/can-promise.js Normal file
View file

@ -0,0 +1,7 @@
// can-promise has a crash in some versions of react native that dont have
// standard global objects
// https://github.com/soldair/node-qrcode/issues/157
module.exports = function () {
return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then
}