[appSwitcher] read/write to $window for test mocking

This commit is contained in:
spalger 2015-09-22 15:34:44 -07:00
parent 344aed432d
commit 10f5f1a45a

View file

@ -28,13 +28,14 @@ require('ui/modules')
}
var toParsed = parse(app.url);
var fromParsed = parse(window.location.href);
var fromParsed = parse($window.location.href);
var sameProto = toParsed.protocol === fromParsed.protocol;
var sameHost = toParsed.host === fromParsed.host;
var samePath = toParsed.path === fromParsed.path;
if (sameProto && sameHost && samePath) {
window.location.reload(true);
$window.location.reload();
event.preventDefault();
}
};