Skip to content

Commit

Permalink
Merge pull request #277 from MindscapeHQ/fix-url-indexOf-undefined-crash
Browse files Browse the repository at this point in the history
Fix url index of undefined crash
  • Loading branch information
UberMouse authored Apr 30, 2018
2 parents 171ea5d + 2cbbc23 commit 91ab410
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 25 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.3",
"version": "2.9.4",
"homepage": "http://raygun.io",
"authors": [
"Mindscape <[email protected]>"
Expand Down
10 changes: 7 additions & 3 deletions dist/raygun.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.3 - 2018-04-27
/*! Raygun4js - v2.9.4 - 2018-05-01
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2018 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -2808,7 +2808,11 @@ var raygunFactory = function (window, $, undefined) {
}


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

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -2984,7 +2988,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.3'
'Version': '2.9.4'
},
'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: 7 additions & 3 deletions dist/raygun.umd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.3 - 2018-04-27
/*! Raygun4js - v2.9.4 - 2018-05-01
* 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 @@ -2857,7 +2857,11 @@ var raygunFactory = function (window, $, undefined) {
}


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

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -3033,7 +3037,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.3'
'Version': '2.9.4'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down
6 changes: 3 additions & 3 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: 7 additions & 3 deletions dist/raygun.vanilla.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.9.3 - 2018-04-27
/*! Raygun4js - v2.9.4 - 2018-05-01
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2018 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -2740,7 +2740,11 @@ var raygunFactory = function (window, $, undefined) {
}


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

for (var i in _whitelistedScriptDomains) {
Expand Down Expand Up @@ -2916,7 +2920,7 @@ var raygunFactory = function (window, $, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.9.3'
'Version': '2.9.4'
},
'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.3",
"version": "2.9.4",
"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.3</version>
<version>2.9.4</version>
<title>Raygun4js</title>
<authors>Mindscape Limited</authors>
<owners>Mindscape Limited</owners>
Expand Down
6 changes: 5 additions & 1 deletion src/raygun.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,11 @@ var raygunFactory = function (window, $, undefined) {
}


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

for (var i in _whitelistedScriptDomains) {
Expand Down

0 comments on commit 91ab410

Please sign in to comment.