File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7777 return val ;
7878 } ;
7979 const browserHasStack = ! ! new Error ( ) . stack ;
80- const _parseFirefoxStack = stack => stack . split ( '\n' ) . slice ( 1 )
80+ const _parseFirefoxStack = stack => stack . split ( '\n' )
8181 . map ( line => {
8282 const at = line . indexOf ( '@' ) ;
8383 const secondCol = line . lastIndexOf ( ':' ) ;
108108 origin
109109 } ;
110110 } ) ;
111- const _parseChromeStack = stack => stack . split ( '\n' ) . slice ( 2 )
111+ const _parseChromeStack = stack => stack . split ( '\n' ) . slice ( 1 )
112112 . map ( line => {
113113 // we have no use for the human readable fluff
114114 line = line . slice ( 7 ) ;
115- const firstOpenParen = line . indexOf ( '(' ) ;
115+ let firstOpenParen = line . indexOf ( '(' ) ;
116116 const secondOpenParen = line . indexOf ( '(' , firstOpenParen + 1 ) ;
117117 const firstCloseParen = line . indexOf ( ')' ) ;
118118 const secondCloseParen = line . indexOf ( ')' , firstCloseParen + 1 ) ;
126126 fourthCol = NaN ;
127127 thirdCol = NaN ;
128128 }
129+ if ( firstOpenParen === - 1 ) {
130+ firstOpenParen = firstCol + 1 ;
131+ thirdCol = line . length ;
132+ }
129133 const name = line . slice ( 0 , firstOpenParen - 1 ) ;
130134 const origin = [
131135 Number ( line . slice ( firstCol + 1 , secondCol ) ) ,
132136 Number ( line . slice ( secondCol + 1 , thirdCol || firstCloseParen ) )
133137 ] ;
134138 let url = line . slice ( firstOpenParen + 1 , firstCol ) ;
139+ if ( ! url ) url = name ;
135140 let evalType = null ;
136141 let evalOrigin = null ;
137142 if ( secondOpenParen !== - 1 ) {
You can’t perform that action at this time.
0 commit comments