diff options
-rw-r--r-- | ext/node/polyfills/async_hooks.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/node/polyfills/async_hooks.ts b/ext/node/polyfills/async_hooks.ts index c97e81ef5..d0fc6a65e 100644 --- a/ext/node/polyfills/async_hooks.ts +++ b/ext/node/polyfills/async_hooks.ts @@ -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; |