refactor($location): Simplify expression.

This commit is contained in:
Lucas Mirelmann
2016-05-28 14:57:43 +02:00
parent f58d4fb748
commit cfc8b41771
+1 -1
View File
@@ -912,7 +912,7 @@ function $LocationProvider() {
// update $location when $browser url changes
$browser.onUrlChange(function(newUrl, newState) {
if (isUndefined(stripBaseUrl(appBaseNoFile, newUrl))) {
if (!startsWith(newUrl, appBaseNoFile)) {
// If we are navigating outside of the app then force a reload
$window.location.href = newUrl;
return;