Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Merge pull request #13934 from jasonrsadler/bug/RefErr#13337
Browse files Browse the repository at this point in the history
Fix window ReferenceError exceptions constantly thrown when browsing
  • Loading branch information
bsclifton authored May 17, 2018
2 parents 027fbd7 + 6f59dd9 commit 4036b7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/lib/urlutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const UrlUtil = {
}

try {
return new window.URL(input).href
return (typeof window === 'undefined') ? input : new window.URL(input).href
} catch (e) {
return input
}
Expand Down

0 comments on commit 4036b7b

Please sign in to comment.