We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db4e701 commit de9118bCopy full SHA for de9118b
1 file changed
lib/internal/errors.js
@@ -81,7 +81,7 @@ const maybeOverridePrepareStackTrace = (globalThis, error, trace) => {
81
// https://crbug.com/v8/7848
82
// `globalThis` is the global that contains the constructor which
83
// created `error`.
84
- if (typeof globalThis.Error.prepareStackTrace === 'function') {
+ if (typeof globalThis.Error?.prepareStackTrace === 'function') {
85
return globalThis.Error.prepareStackTrace(error, trace);
86
}
87
// We still have legacy usage that depends on the main context's `Error`
0 commit comments