In https://github.com/cefn/watchable/issues/62 @davidfiala reported that some thenables (which were not strictly instanceof Promise) were taking the wrong path in the constructor arg to Unpromise. They ended up being interpreted as an executor function instead leading to bugs.
In this PR the check is inverted and is therefore a bit more safe. It won't mistakenly treat a non-function as a Promise executor.
In https://github.com/cefn/watchable/issues/62 @davidfiala reported that some thenables (which were not strictly
instanceof Promise
) were taking the wrong path in the constructor arg to Unpromise. They ended up being interpreted as an executor function instead leading to bugs.In this PR the check is inverted and is therefore a bit more safe. It won't mistakenly treat a non-function as a Promise executor.