From c62dd1cacb6ab8de23e095881acc4ccfd676af3c Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Wed, 22 Apr 2020 11:56:59 +0200 Subject: [PATCH] Merge pull request #2740 from overleaf/ns-jpa-remove-error-2fa Remove error upon success for asyncForms GitOrigin-RevId: 27e09667b11229b010d270ec2637082e069fcc95 --- services/web/frontend/js/directives/asyncForm.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/web/frontend/js/directives/asyncForm.js b/services/web/frontend/js/directives/asyncForm.js index 0ef96b5499..6deb81864b 100644 --- a/services/web/frontend/js/directives/asyncForm.js +++ b/services/web/frontend/js/directives/asyncForm.js @@ -53,6 +53,8 @@ define(['../base', 'libs/passfield'], function(App) { formData['g-recaptcha-response'] = grecaptchaResponse } + // clear the response object which may be referenced downstream + Object.keys(response).forEach(field => delete response[field]) scope[attrs.name].inflight = true // for asyncForm prevent automatic redirect to /login if