Created
September 25, 2014 18:24
-
-
Save tkissing/5ff2aff41ff3c5740545 to your computer and use it in GitHub Desktop.
Promise.resolve issue(?)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ithrow() { | |
throw Error("Can't do that"); | |
} | |
p1 = new Promise(function(resolve) { | |
resolve(ithrow()) | |
}); | |
p1.then(console.log.bind(console, 'p1'), console.warn.bind(console, 'p1')); | |
p2 = Promise.resolve(ithrow()); | |
p2.then(console.log.bind(console, 'p2'), console.warn.bind(console, 'p2')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment