aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2018-08-19 19:33:16 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2018-08-19 19:33:16 +0300
commit0e77706dc5d2928e945c34b9ac49ff0807888ba5 (patch)
tree90e597f37b81f25bc0d2623d1e8cf5c43e34ff87 /activestorage
parent97feb4996b1c88f770101dfce6d4d3a6baf6bb33 (diff)
downloadrails-0e77706dc5d2928e945c34b9ac49ff0807888ba5.tar.gz
rails-0e77706dc5d2928e945c34b9ac49ff0807888ba5.tar.bz2
rails-0e77706dc5d2928e945c34b9ac49ff0807888ba5.zip
activestorage: yarn build
Context https://github.com/rails/rails/pull/33413#issuecomment-414137587
Diffstat (limited to 'activestorage')
-rw-r--r--activestorage/app/assets/javascripts/activestorage.js8
1 files changed, 4 insertions, 4 deletions
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;