Closed Heath123 closed 4 years ago
it should be enough to call this function only if it exists, e.g.
if (Error.captureStackTrace != null)
Error.captureStackTrace(this, this.constructor.name)
On Firefox (and most other browser), the stack
property of Error seems to be created on Error construction and not need to be manually acquired.
.captureStackTrace
is an undocumented V8 function that won't work on other JavaScript engines, which breaks Browserify/Webpack in Firefox (although it works in Chrome). On Edge the error isObject doesn't support property or method 'captureStackTrace'
.This happens here: