Skip to content

Commit

Permalink
Merge pull request #276 from MindscapeHQ/fix-null-comparisons-when-un…
Browse files Browse the repository at this point in the history
…defined

Fix null comparisons when undefined
  • Loading branch information
UberMouse authored Apr 26, 2018
2 parents 8ac95a0 + e747e0b commit 171ea5d
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 28 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raygun4js",
"version": "2.9.2",
"version": "2.9.3",
"homepage": "http://raygun.io",
"authors": [
"Mindscape <[email protected]>"
Expand Down
10 changes: 6 additions & 4 deletions dist/raygun.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.2 - 2018-04-19
/*! Raygun4js - v2.9.3 - 2018-04-27
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2018 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -2693,7 +2693,9 @@ var raygunFactory = function (window, $, undefined) {
if (_filteredKeys) {
for (var i = 0; i < _filteredKeys.length; i++) {
if (typeof _filteredKeys[i] === 'object' && typeof _filteredKeys[i].exec === 'function') {
if (_filteredKeys[i].exec(key) !== null) {
var executedFilter = _filteredKeys[i].exec(key);

if (executedFilter !== null && executedFilter !== undefined) {
return '[removed by filter]';
}
}
Expand Down Expand Up @@ -2806,7 +2808,7 @@ var raygunFactory = function (window, $, undefined) {
}


if (stackTrace.stack[0].url !== null && stackTrace.stack[0].url.indexOf(domain) === -1) {
if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) {
var allowedDomainFound = false;

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -2982,7 +2984,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.2'
'Version': '2.9.3'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down
6 changes: 3 additions & 3 deletions dist/raygun.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.min.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/raygun.umd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.2 - 2018-04-19
/*! Raygun4js - v2.9.3 - 2018-04-27
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2018 MindscapeHQ; Licensed MIT */
// https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
Expand Down Expand Up @@ -2742,7 +2742,9 @@ var raygunFactory = function (window, $, undefined) {
if (_filteredKeys) {
for (var i = 0; i < _filteredKeys.length; i++) {
if (typeof _filteredKeys[i] === 'object' && typeof _filteredKeys[i].exec === 'function') {
if (_filteredKeys[i].exec(key) !== null) {
var executedFilter = _filteredKeys[i].exec(key);

if (executedFilter !== null && executedFilter !== undefined) {
return '[removed by filter]';
}
}
Expand Down Expand Up @@ -2855,7 +2857,7 @@ var raygunFactory = function (window, $, undefined) {
}


if (stackTrace.stack[0].url !== null && stackTrace.stack[0].url.indexOf(domain) === -1) {
if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) {
var allowedDomainFound = false;

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -3031,7 +3033,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.2'
'Version': '2.9.3'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down
4 changes: 2 additions & 2 deletions dist/raygun.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.umd.min.js.map

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions dist/raygun.vanilla.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.2 - 2018-04-19
/*! Raygun4js - v2.9.3 - 2018-04-27
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2018 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -2625,7 +2625,9 @@ var raygunFactory = function (window, $, undefined) {
if (_filteredKeys) {
for (var i = 0; i < _filteredKeys.length; i++) {
if (typeof _filteredKeys[i] === 'object' && typeof _filteredKeys[i].exec === 'function') {
if (_filteredKeys[i].exec(key) !== null) {
var executedFilter = _filteredKeys[i].exec(key);

if (executedFilter !== null && executedFilter !== undefined) {
return '[removed by filter]';
}
}
Expand Down Expand Up @@ -2738,7 +2740,7 @@ var raygunFactory = function (window, $, undefined) {
}


if (stackTrace.stack[0].url !== null && stackTrace.stack[0].url.indexOf(domain) === -1) {
if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) {
var allowedDomainFound = false;

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -2914,7 +2916,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.2'
'Version': '2.9.3'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down
6 changes: 3 additions & 3 deletions dist/raygun.vanilla.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.vanilla.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main": "dist/raygun.umd.js",
"title": "Raygun4js",
"description": "Raygun.io plugin for JavaScript",
"version": "2.9.2",
"version": "2.9.3",
"homepage": "https://github.com/MindscapeHQ/raygun4js",
"author": {
"name": "MindscapeHQ",
Expand Down
2 changes: 1 addition & 1 deletion raygun4js.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>raygun4js</id>
<version>2.9.2</version>
<version>2.9.3</version>
<title>Raygun4js</title>
<authors>Mindscape Limited</authors>
<owners>Mindscape Limited</owners>
Expand Down
6 changes: 4 additions & 2 deletions src/raygun.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,9 @@ var raygunFactory = function (window, $, undefined) {
if (_filteredKeys) {
for (var i = 0; i < _filteredKeys.length; i++) {
if (typeof _filteredKeys[i] === 'object' && typeof _filteredKeys[i].exec === 'function') {
if (_filteredKeys[i].exec(key) !== null) {
var executedFilter = _filteredKeys[i].exec(key);

if (executedFilter !== null && executedFilter !== undefined) {
return '[removed by filter]';
}
}
Expand Down Expand Up @@ -608,7 +610,7 @@ var raygunFactory = function (window, $, undefined) {
}


if (stackTrace.stack[0].url !== null && stackTrace.stack[0].url.indexOf(domain) === -1) {
if (stackTrace.stack[0].url !== null && stackTrace.stack[0] !== undefined && stackTrace.stack[0].url.indexOf(domain) === -1) {
var allowedDomainFound = false;

for (var i in _whitelistedScriptDomains) {
Expand Down

0 comments on commit 171ea5d

Please sign in to comment.