Skip to content

Commit e75467d

Browse files
committed
Test whether joinRegExp processes empty or undefined variables
Raven throws an error if empty or undefined variables are processed by joinRegExp. Some browsers (such as Internet Explorer 8 and possibly earlier) apparently pass these variables, causing errors.
1 parent 1e5c561 commit e75467d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/raven.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -873,6 +873,12 @@ describe('globals', function() {
873873
'a', 'b', 'a.b', /d/, /[0-9]/
874874
]).source, 'a|b|a\\.b|d|[0-9]');
875875
});
876+
877+
it('should not process empty or undefined variables', function() {
878+
assert.equal(joinRegExp([
879+
'a', 'b', null, undefined
880+
]).source, 'a|b');
881+
});
876882
});
877883
});
878884

0 commit comments

Comments
 (0)