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:
parent
04a259e2c8
commit
2507d6fa10
1 changed files with 3 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue