mirror of
https://github.com/matrix-construct/construct
synced 2024-05-29 08:13:46 +02:00
client: Fix defaulting to empty closure.
This commit is contained in:
parent
abf0ff294b
commit
23c93e9426
|
@ -189,6 +189,9 @@ mc.ng.timeout = function(timeout, closure)
|
||||||
timeout = undefined;
|
timeout = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(typeof(closure) != "function")
|
||||||
|
closure = () => {};
|
||||||
|
|
||||||
//TODO: XXX: arbitrary
|
//TODO: XXX: arbitrary
|
||||||
let $timeout = mc.ng.timeout.$timeout;
|
let $timeout = mc.ng.timeout.$timeout;
|
||||||
return $timeout(closure, timeout);
|
return $timeout(closure, timeout);
|
||||||
|
|
Loading…
Reference in a new issue