diff --git a/docs/scripting-ref.rst b/docs/scripting-ref.rst index 384b91c34..e6a00a5e6 100644 --- a/docs/scripting-ref.rst +++ b/docs/scripting-ref.rst @@ -426,14 +426,14 @@ amount of time: function wait_until(splash, timeout, polling_interval, check_func, ...) -- XXX: polling_interval shall not be too small - local vargs = ... + local vargs = {...} local ok, result1, result2 = splash:with_timeout(function() while true do local ok, reason = splash:wait(polling_interval) if not ok then return ok, string.format('wait failed: %s', reason) end - local check_result = check_func(vargs) + local check_result = check_func(table.unpack(vargs)) if check_result then return true, check_result end