From 215c0f6c59af4b45905c5f48143a51cababf1c55 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Wed, 7 Feb 2018 14:48:58 +0100 Subject: [PATCH 1/2] fix: Dsn type check Fixes #342 --- lib/Sentry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sentry.js b/lib/Sentry.js index 07b1700470..69c993e743 100644 --- a/lib/Sentry.js +++ b/lib/Sentry.js @@ -49,7 +49,7 @@ export const Sentry = { }, config(dsn, options) { - if (dsn.constructor !== String) { + if (typeof dsn != 'string') { throw new Error('Sentry: A DSN must be provided'); } Sentry._dsn = dsn; From e17aeeb219d6e987e10073b0caffb49349eb0fc4 Mon Sep 17 00:00:00 2001 From: Jan Michael Auer Date: Wed, 7 Feb 2018 14:54:48 +0100 Subject: [PATCH 2/2] fix: Strict type comparison --- lib/Sentry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Sentry.js b/lib/Sentry.js index 69c993e743..683198135f 100644 --- a/lib/Sentry.js +++ b/lib/Sentry.js @@ -49,7 +49,7 @@ export const Sentry = { }, config(dsn, options) { - if (typeof dsn != 'string') { + if (typeof dsn !== 'string') { throw new Error('Sentry: A DSN must be provided'); } Sentry._dsn = dsn;