Skip to content

Commit 8e93262

Browse files
committed
Merge pull request #208 from zalmoxisus/master
Solve the issue with loosing sourceMaps in Chrome
2 parents b88280a + 10db8ac commit 8e93262

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/instrument.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ function computeNextEntry(reducer, action, state, error) {
6767
nextState = reducer(state, action);
6868
} catch (err) {
6969
nextError = err.toString();
70-
console.error(err.stack || err);
70+
if (typeof window === 'object' && typeof window.chrome !== 'undefined') {
71+
// Solve the issue with loosing sourceMaps in Chrome
72+
setTimeout(() => { throw err; }, 0);
73+
} else console.error(err.stack || err);
7174
}
7275

7376
return {

0 commit comments

Comments
 (0)