A friend reached me and discovered that there is a bug in the console.
As you can see in the screens below (and trying the code example
), in the stacktrace Firefox doesn’t report that the variable is undefined instead Chrome report that.
Thanks Daniele.
The issue lies in this piece of code:
if (result instanceof Error) {
result.sagaStack = 'at ' + name + ' \n ' + (result.sagaStack || result.stack);
}
if (!task.cont) {
log('error', 'uncaught', result.sagaStack || result.stack);
if (result instanceof Error && onError) {
onError(result);
}
}
The library is using Error.stack
to print the error, which is not standard and behaves differently in every browser (Chrome does print the error message along the stack).
There was a similar error in another library that we fixed (https://github.com/apollographql/react-apollo/pull/1568).
I’ll file a bug (and create a PR maybe) on the library
Thanks for the explanation!