0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-03-03 09:31:22 -05:00

fix(node/async_hooks): don't pop async context frame if stack if empty (#20077)

Closes https://github.com/denoland/deno/issues/20076
This commit is contained in:
Bartek Iwańczuk 2023-08-10 05:30:25 +02:00 committed by GitHub
parent 04a259e2c8
commit 2507d6fa10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,8 +22,9 @@ function pushAsyncFrame(frame: AsyncContextFrame) {
}
function popAsyncFrame() {
assert(asyncContextStack.length > 0);
asyncContextStack.pop();
if (asyncContextStack.length > 0) {
asyncContextStack.pop();
}
}
let rootAsyncFrame: AsyncContextFrame | undefined = undefined;