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) {
563
563
564
564
normalized . in_app = ! ( // determine if an exception came from outside of our app
565
565
// first we check the global includePaths list.
566
- ! globalOptions . includePaths . test ( normalized . filename ) ||
566
+ ( ! ! globalOptions . includePaths . test && ! globalOptions . includePaths . test ( normalized . filename ) ) ||
567
567
// Now we check for fun, if the function name is Raven or TraceKit
568
568
/ ( R a v e n | T r a c e K i t ) \. / . test ( normalized [ 'function' ] ) ||
569
569
// 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() {
596
596
in_app : false
597
597
} ) ;
598
598
} ) ;
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
+ } ) ;
599
612
} ) ;
600
613
601
614
describe ( 'extractContextFromFrame' , function ( ) {
You can’t perform that action at this time.
0 commit comments