Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d18cb2a

Browse files
committed
WIP: rename local hasChangedOutside variable to not match getter/setter name
1 parent c806afc commit d18cb2a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ng/browser.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Browser(window, document, $log, $sniffer) {
3030
setTimeout = window.setTimeout,
3131
clearTimeout = window.clearTimeout,
3232
pendingDeferIds = {},
33-
urlChangedOutsideAngular = false;
33+
hasChangedOutside = false;
3434

3535
self.isMock = false;
3636

@@ -181,7 +181,7 @@ function Browser(window, document, $log, $sniffer) {
181181
return newLocation;
182182
}
183183
if (lastBrowserUrl !== (currentHref = location.href.replace(/%27/g,"'"))) {
184-
urlChangedOutsideAngular = true;
184+
hasChangedOutside = true;
185185
}
186186
return currentHref;
187187
}
@@ -202,13 +202,13 @@ function Browser(window, document, $log, $sniffer) {
202202
* @param {boolean} val New value to set as urlChangedOutsideAngular,
203203
* typically used to reset value to false.
204204
*/
205-
self.urlChangedOutsideAngular = function(val) {
206-
if (isDefined(val)) {
207-
urlChangedOutsideAngular = val;
205+
self.urlChangedOutsideAngular = function(hasChanged) {
206+
if (isDefined(hasChanged)) {
207+
hasChangedOutside = hasChanged;
208208
return self;
209209
}
210210
else {
211-
return urlChangedOutsideAngular;
211+
return hasChangedOutside;
212212
}
213213
};
214214

@@ -217,7 +217,7 @@ function Browser(window, document, $log, $sniffer) {
217217

218218
function fireUrlChange() {
219219
newLocation = null;
220-
urlChangedOutsideAngular = false;
220+
hasChangedOutside = false;
221221
if (lastBrowserUrl == self.url()) return;
222222

223223
lastBrowserUrl = self.url();

0 commit comments

Comments
 (0)