Skip to content

Commit

Permalink
Merge pull request #346 from damienleroux/patch-1
Browse files Browse the repository at this point in the history
Update host.js => window.location is not defined
  • Loading branch information
spalger committed Jan 26, 2016
2 parents 1544ef8 + 4e152d8 commit 010a8b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var startsWithProtocolRE = /^([a-z]+:)?\/\//;
var defaultProto = 'http:';
var btoa;

if (typeof window !== 'undefined') {
if (typeof window !== 'undefined' && typeof window.location !== 'undefined') {
defaultProto = window.location.protocol;
btoa = window.btoa;
}
Expand Down

0 comments on commit 010a8b1

Please sign in to comment.