mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Ensure we are in a digest loop when updating validation errors
This commit is contained in:
parent
3731c62e17
commit
36513f443c
1 changed files with 3 additions and 1 deletions
|
@ -81,7 +81,9 @@ define [
|
|||
completeSubscription = (err, recurly_token_id) ->
|
||||
$scope.validation.errorFields = {}
|
||||
if err?
|
||||
$scope.$apply () ->
|
||||
# We may or may not be in a digest loop here depending on
|
||||
# whether recurly could do validation locally, so do it async
|
||||
$scope.$evalAsync () ->
|
||||
$scope.processing = false
|
||||
$scope.genericError = err.message
|
||||
_.each err.fields, (field)-> $scope.validation.errorFields[field] = true
|
||||
|
|
Loading…
Reference in a new issue