You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the browser bundle of awilix and when I try to resolve something that hasn't been registered it throws a Error.captureStackTrace is not a function error in non V8 browsers, like Firefox and Safari. Works fine in Chromium based browsers.
I'm using the browser bundle of awilix and when I try to resolve something that hasn't been registered it throws a
Error.captureStackTrace is not a function
error in non V8 browsers, like Firefox and Safari. Works fine in Chromium based browsers.Problem is that
Error.captureStackTrace
is a V8 only non-standard function, see here on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#static_methodsIt is being used here: https://github.com/jeffijoe/awilix/blob/master/src/errors.ts#L33
Maybe
Error.prototype.stack
could be used instead? It is also a non-standard property but at least supported by all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error/stackAs far as I understood the stack property should be populated as soon as an Error is thrown.
The text was updated successfully, but these errors were encountered: