diff options
author | snek <snek@deno.com> | 2024-08-06 14:52:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-06 12:52:53 +0000 |
commit | 897159dc6e1b2319cf2f5f09d8d6cecc0d3175fa (patch) | |
tree | cfe4a043d1fc102a4e051b99c7fcbef7b79bbb91 /ext/node/polyfills/assert.ts | |
parent | c0e9512b39a4ed3713d1fd9b28469d0edf68f578 (diff) |
feat: vm rewrite (#24596)
rewrite vm implementation to increase compat.
vm.Module+importModuleDynamically callbacks should be added in a
followup.
Diffstat (limited to 'ext/node/polyfills/assert.ts')
-rw-r--r-- | ext/node/polyfills/assert.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/node/polyfills/assert.ts b/ext/node/polyfills/assert.ts index 00677e3f7..188c7a0c2 100644 --- a/ext/node/polyfills/assert.ts +++ b/ext/node/polyfills/assert.ts @@ -746,6 +746,9 @@ function validateThrownError( message = error; error = undefined; } + if (error?.prototype !== undefined && e instanceof error) { + return true; + } if ( typeof error === "function" && (error === Error || ObjectPrototypeIsPrototypeOf(Error, error)) |