mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
Merge pull request #8286 from mkllnk/permalink-check
Avoid superfluous permalink check on site load
This commit is contained in:
@@ -9,6 +9,10 @@ angular.module("admin.enterprises")
|
||||
$scope.checking = false
|
||||
|
||||
$scope.$watch "Enterprise.permalink", (newValue, oldValue) ->
|
||||
if newValue == initialPermalink
|
||||
$scope.availability = ""
|
||||
return
|
||||
|
||||
$scope.checking = true
|
||||
pendingRequest = PermalinkChecker.check(newValue)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ angular.module("admin.enterprises").factory 'PermalinkChecker', ($q, $http) ->
|
||||
deferredRequest.reject()
|
||||
|
||||
deferredRequest.promise.finally ->
|
||||
request = deferredRequest.promise = null;
|
||||
request = deferredRequest.promise = null
|
||||
|
||||
deferredRequest.promise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user