aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/upload_progress_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/helpers/upload_progress_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/upload_progress_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/upload_progress_helper.rb b/actionpack/lib/action_view/helpers/upload_progress_helper.rb
index 8563ca3beb..00e5f25f3d 100644
--- a/actionpack/lib/action_view/helpers/upload_progress_helper.rb
+++ b/actionpack/lib/action_view/helpers/upload_progress_helper.rb
@@ -384,7 +384,7 @@ module ActionView
end.to_i
# TODO do animation instead of jumping
- "$('#{progress_bar_id}').firstChild.firstChild.style.width='#{percent}%'"
+ "if($('#{progress_bar_id}')){$('#{progress_bar_id}').firstChild.firstChild.style.width='#{percent}%'}"
end
# Generates a nicely formatted string of current upload progress for