File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -563,7 +563,7 @@ function normalizeFrame(frame) {
563563
564564 normalized . in_app = ! ( // determine if an exception came from outside of our app
565565 // first we check the global includePaths list.
566- ! globalOptions . includePaths . test ( normalized . filename ) ||
566+ ( ! ! globalOptions . includePaths . test && ! globalOptions . includePaths . test ( normalized . filename ) ) ||
567567 // Now we check for fun, if the function name is Raven or TraceKit
568568 / ( R a v e n | T r a c e K i t ) \. / . test ( normalized [ 'function' ] ) ||
569569 // finally, we do a last ditch effort and check for raven.min.js
Original file line number Diff line number Diff line change @@ -596,6 +596,19 @@ describe('globals', function() {
596596 in_app : false
597597 } ) ;
598598 } ) ;
599+
600+ it ( 'should not blow up if includePaths is empty, regression for #377' , function ( ) {
601+ this . sinon . stub ( window , 'extractContextFromFrame' ) . returns ( undefined ) ;
602+ var frame = {
603+ url : 'http://lol.com/path/file.js' ,
604+ line : 10 ,
605+ column : 11 ,
606+ func : 'TraceKit.lol'
607+ // context: [] context is stubbed
608+ } ;
609+ globalOptions . includePaths = [ ] ;
610+ normalizeFrame ( frame ) ;
611+ } ) ;
599612 } ) ;
600613
601614 describe ( 'extractContextFromFrame' , function ( ) {
You can’t perform that action at this time.
0 commit comments