Skip to content

Instantly share code, notes, and snippets.

@kyranet
Last active March 10, 2019 00:37
Show Gist options
  • Save kyranet/43668e9c593a77503235bfbe82a1d031 to your computer and use it in GitHub Desktop.
Save kyranet/43668e9c593a77503235bfbe82a1d031 to your computer and use it in GitHub Desktop.
// The gist has been updated to be shortened to the shortest reproducible code,
// the old code is still available in this gist's history. However, the same bug
// is reproducible with this very small sample.
(() => {
async function test() {
console.log(new Error('Test 1'));
await Promise.resolve(null);
console.log(new Error('Test 2'));
}
test();
})();
Error: Test 1
at test (<anonymous>:3:14)
at <anonymous>:8:1
at <anonymous>:9:3
Error: Test 2
at test (<anonymous>:5:14)
Error: Test 1
at test (<anonymous>:3:14)
at <anonymous>:8:1
at <anonymous>:9:3
Error: Test 2
at test (<anonymous>:5:14)
at <anonymous>:8:1
at <anonymous>:9:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment