Skip to content

Commit

Permalink
Solve the issue with loosing sourceMaps in Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
zalmoxisus committed Dec 20, 2015
1 parent e400dea commit 10db8ac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/instrument.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ function computeNextEntry(reducer, action, state, error) {
nextState = reducer(state, action);
} catch (err) {
nextError = err.toString();
console.error(err.stack || err);
if (typeof window === 'object' && typeof window.chrome !== 'undefined') {
// Solve the issue with loosing sourceMaps in Chrome
setTimeout(() => { throw err; }, 0);
} else console.error(err.stack || err);
}

return {
Expand Down

0 comments on commit 10db8ac

Please sign in to comment.