File tree 1 file changed +6
-9
lines changed
packages/react-client/src 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -1614,10 +1614,6 @@ function resolveErrorDev(
1614
1614
} else {
1615
1615
error = callStack ( ) ;
1616
1616
}
1617
- // Overriding the stack isn't really necessary at this point and maybe we should just
1618
- // leave the native one. However, the native one gets printed unsource mapped with
1619
- // reportError. If that's fixed it might be better to use the native one.
1620
- error . stack = stack ;
1621
1617
}
1622
1618
1623
1619
( error : any ) . digest = digest ;
@@ -1723,20 +1719,21 @@ function createFakeFunction<T>(
1723
1719
// point to the original source.
1724
1720
let code ;
1725
1721
if ( line <= 1 ) {
1726
- code = '_=>' + ' ' . repeat ( col < 4 ? 0 : col - 4 ) + '_()\n' + comment + '\n' ;
1722
+ code = '_=>' + ' ' . repeat ( col < 4 ? 0 : col - 4 ) + '_()\n' + comment ;
1727
1723
} else {
1728
1724
code =
1729
1725
comment +
1730
1726
'\n' . repeat ( line - 2 ) +
1731
1727
'_=>\n' +
1732
1728
' ' . repeat ( col < 1 ? 0 : col - 1 ) +
1733
- '_()\n ' ;
1729
+ '_()' ;
1734
1730
}
1735
1731
1732
+ if (filename) {
1733
+ code += '\n//# sourceURL=' + filename ;
1734
+ }
1736
1735
if (sourceMap) {
1737
- code += '//# sourceMappingURL=' + sourceMap ;
1738
- } else if (filename) {
1739
- code += '//# sourceURL=' + filename ;
1736
+ code += '\n//# sourceMappingURL=' + sourceMap ;
1740
1737
}
1741
1738
1742
1739
let fn: FakeFunction< T > ;
You can’t perform that action at this time.
0 commit comments