Skip to content

Commit

Permalink
remove call to window.location (fix #846) (#847)
Browse files Browse the repository at this point in the history
Removed call to window.location
  • Loading branch information
ranfdev authored and devongovett committed Feb 18, 2018
1 parent 83d4e3b commit 6e0a7f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/builtins/hmr-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.bundle.Module = Module;
var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = process.env.HMR_HOSTNAME || location.hostname;
var protocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + process.env.HMR_PORT + '/');
ws.onmessage = function(event) {
var data = JSON.parse(event.data);
Expand Down

0 comments on commit 6e0a7f6

Please sign in to comment.