| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e8434d8 commit 3c90b1a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -81,7 +81,7 @@ const maybeOverridePrepareStackTrace = (globalThis, error, trace) => { | |||
| 81 | 81 | // https://crbug.com/v8/7848 | |
| 82 | 82 | // `globalThis` is the global that contains the constructor which | |
| 83 | 83 | // created `error`. | |
| 84 | - if (typeof globalThis.Error.prepareStackTrace === 'function') { | ||
| 84 | + if (typeof globalThis.Error?.prepareStackTrace === 'function') { | ||
| 85 | 85 | return globalThis.Error.prepareStackTrace(error, trace); | |
| 86 | 86 | } | |
| 87 | 87 | // We still have legacy usage that depends on the main context's `Error` | |
| Back | FazBrowse Home | New Git URL |
0 commit comments