Return early from `finished_all_ajax_requests?` when jQuery is undefined
This commit is contained in:
parent
5647d5deaf
commit
6b298d06b4
|
@ -7,6 +7,7 @@ module WaitForAjax
|
|||
|
||||
def finished_all_ajax_requests?
|
||||
return true unless javascript_test?
|
||||
return true if page.evaluate_script('typeof jQuery === "undefined"')
|
||||
|
||||
page.evaluate_script('jQuery.active').zero?
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue