Skip to content

Commit 737cda4

Browse files
committed
Be more specific and just filter "Error" types since I have no idea what is going on
1 parent 5949ce9 commit 737cda4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ function processException(type, message, fileurl, lineno, frames, options) {
507507
// This can only mean that the message was falsey since this value
508508
// is hardcoded into Sentry itself.
509509
// At this point, if the message is falsey, we bail since it's useless
510-
if (!type && !message) return;
510+
if (type === 'Error' && !message) return;
511511

512512
if (globalOptions.ignoreErrors.test(message)) return;
513513

test/raven.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,11 @@ describe('globals', function() {
609609
it('should ignored falsey messages', function() {
610610
this.sinon.stub(window, 'send');
611611

612-
processException('', '', 'http://example.com', []);
612+
processException('Error', '', 'http://example.com', []);
613613
assert.isFalse(window.send.called);
614+
615+
processException('TypeError', '', 'http://example.com', []);
616+
assert.isTrue(window.send.called);
614617
});
615618
});
616619

0 commit comments

Comments
 (0)