Skip to content

Commit 6d0728b

Browse files
chore(lint): linted
1 parent 170b895 commit 6d0728b

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/urlMatcherFactory.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,7 @@ function $UrlMatcherFactory() {
606606
},
607607
json: {
608608
encode: angular.toJson,
609-
decode: function(val) {
610-
return angular.fromJson(val) },
609+
decode: angular.fromJson,
611610
is: angular.isObject,
612611
equals: angular.equals,
613612
pattern: /[^/]*/

src/urlRouter.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
265265
$get.$inject = ['$location', '$rootScope', '$injector', '$browser'];
266266
function $get( $location, $rootScope, $injector, $browser) {
267267

268-
var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl = undefined;
268+
var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;
269269

270270
function appendBasePath(url, isHtml5, absolute) {
271271
if (baseHref === '/') return url;
@@ -277,9 +277,9 @@ function $UrlRouterProvider( $locationProvider, $urlMatcherFactory) {
277277
// TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree
278278
function update(evt) {
279279
if (evt && evt.defaultPrevented) return;
280-
if (lastPushedUrl && $location.url() === lastPushedUrl)
281-
return lastPushedUrl = undefined;
280+
var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;
282281
lastPushedUrl = undefined;
282+
if (ignoreUpdate) return true;
283283

284284
function check(rule) {
285285
var handled = rule($injector, $location);

0 commit comments

Comments
 (0)