0
0
Fork 0
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:
Jason Volk 2019-11-26 15:54:40 -08:00
parent abf0ff294b
commit 23c93e9426

View file

@ -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);