Skip to content
This repository was archived by the owner on Jan 24, 2019. It is now read-only.

Commit dfc539a

Browse files
committed
Merge pull request #118 from litixsoft/master
error correction
2 parents e5e5225 + d7c83a6 commit dfc539a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

modules/route/route.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ angular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', func
2222

2323
// Used by href and ngHref
2424
function staticWatcher(newVal) {
25-
if ((hash = newVal.indexOf('#')) > -1){
25+
var hash = newVal.indexOf('#');
26+
if (hash > -1){
2627
newVal = newVal.substr(hash + 1);
2728
}
2829
watcher = function watchHref() {
@@ -32,7 +33,8 @@ angular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', func
3233
}
3334
// Used by uiRoute
3435
function regexWatcher(newVal) {
35-
if ((hash = newVal.indexOf('#')) > -1){
36+
var hash = newVal.indexOf('#');
37+
if (hash > -1){
3638
newVal = newVal.substr(hash + 1);
3739
}
3840
watcher = function watchRegex() {

0 commit comments

Comments
 (0)