Skip to content

Commit

Permalink
fix some random test failures (#5341)
Browse files Browse the repository at this point in the history
* fix some random test failures

* use typeof to test for existence
  • Loading branch information
jpcunningh authored and sulkaharo committed Dec 20, 2019
1 parent 14e8c8c commit e0667c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/client/browser-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function init ($) {

function queryParms () {
var params = {};
if (location.search) {
if ((typeof location !== 'undefined') && location.search) {
location.search.substr(1).split('&').forEach(function(item) {
// eslint-disable-next-line no-useless-escape
params[item.split('=')[0]] = item.split('=')[1].replace(/[_\+]/g, ' ');
Expand Down

0 comments on commit e0667c9

Please sign in to comment.