mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 12:51:35 +02:00
Ensure we are in a digest loop when updating validation errors
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user