From c1430fe4df0d306b9d76a2a3a4f444905da665f5 Mon Sep 17 00:00:00 2001 From: tunnckoCore Date: Sat, 11 Mar 2017 17:54:47 +0200 Subject: [PATCH] fix(detection): strict coercion to boolean for the promise.___customPromise and promise.___nativePromise --- dist/redolent.common.js | 4 ++-- dist/redolent.es.js | 4 ++-- index.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/redolent.common.js b/dist/redolent.common.js index 16d8686..25db631 100644 --- a/dist/redolent.common.js +++ b/dist/redolent.common.js @@ -376,8 +376,8 @@ var index = function redolent (fn, opts) { } }); - promise.___nativePromise = index$10; - promise.___customPromise = !index$10; + promise.___nativePromise = Boolean(index$10); + promise.___customPromise = !promise.___nativePromise; return promise } }; diff --git a/dist/redolent.es.js b/dist/redolent.es.js index 327141c..dd7b659 100644 --- a/dist/redolent.es.js +++ b/dist/redolent.es.js @@ -374,8 +374,8 @@ var index = function redolent (fn, opts) { } }); - promise.___nativePromise = index$10; - promise.___customPromise = !index$10; + promise.___nativePromise = Boolean(index$10); + promise.___customPromise = !promise.___nativePromise; return promise } }; diff --git a/index.js b/index.js index 38664f9..8c492ef 100644 --- a/index.js +++ b/index.js @@ -106,8 +106,8 @@ module.exports = function redolent (fn, opts) { } }) - promise.___nativePromise = Native - promise.___customPromise = !Native + promise.___nativePromise = Boolean(Native) + promise.___customPromise = !promise.___nativePromise return promise } }