es6-shim
es6-shim copied to clipboard
native Promise broken in node 10.0 and 10.1
in node < 10, or 10.2+, the following code in the REPL shows a rejected promise. in node 10.0 and 10.1, however, the promise is forever pending.
var r, p = new Promise(y => { r = y; }); r({ then() { throw 42; } }); p;
https://github.com/v8/v8/commit/40060be68ca4faf00f526c5e581148e1141f489d is the bug fix; there may not be any way to synchronously detect it.