From 0e77706dc5d2928e945c34b9ac49ff0807888ba5 Mon Sep 17 00:00:00 2001 From: bogdanvlviv Date: Sun, 19 Aug 2018 19:33:16 +0300 Subject: activestorage: yarn build Context https://github.com/rails/rails/pull/33413#issuecomment-414137587 --- activestorage/app/assets/javascripts/activestorage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'activestorage') diff --git a/activestorage/app/assets/javascripts/activestorage.js b/activestorage/app/assets/javascripts/activestorage.js index 8a51805960..375eb6b533 100644 --- a/activestorage/app/assets/javascripts/activestorage.js +++ b/activestorage/app/assets/javascripts/activestorage.js @@ -855,7 +855,7 @@ return DirectUploadsController; }(); var processingAttribute = "data-direct-uploads-processing"; - var submitButtonsByForm = new WeakMap; + var submitButtonsByForm = new WeakMap(); var started = false; function start() { if (!started) { @@ -866,8 +866,9 @@ } } function didClick(event) { - if (event.target.tagName == "INPUT" && event.target.type == "submit" && event.target.form) { - submitButtonsByForm.set(event.target.form, event.target); + var target = event.target; + if (target.tagName == "INPUT" && target.type == "submit" && target.form) { + submitButtonsByForm.set(target.form, target); } } function didSubmitForm(event) { @@ -902,7 +903,6 @@ } function submitForm(form) { var button = submitButtonsByForm.get(form) || findElement(form, "input[type=submit]"); - if (button) { var _button = button, disabled = _button.disabled; button.disabled = false; -- cgit v1.2.3