Skip to content

Commit 80c5380

Browse files
committed
Fix wait_for_task comparison of String with 5000
If the `async_interval` is over `1000` and a string then the `async_interval += 250 if async_interval < 5000` will throw an exception.
1 parent 1fe3254 commit 80c5380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/application_controller/wait_for_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def wait_for_task
2525

2626
def browser_refresh_task(task_id, async_interval, should_flash: false)
2727
async_interval = 1000 if async_interval.to_i < 1000 # if it is not an integer, assign to 1 second
28-
async_interval += 250 if async_interval < 5000 # Slowly move up to 5 second retries
28+
async_interval += 250 if async_interval.to_i < 5000 # Slowly move up to 5 second retries
2929
render :update do |page|
3030
page << javascript_prologue
3131
ajax_call = remote_function(:url => {:action => 'wait_for_task', :task_id => task_id, :async_interval => async_interval})

0 commit comments

Comments
 (0)