From 23c93e94262d0b312fe893b0bf84506a19af94c6 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 26 Nov 2019 15:54:40 -0800 Subject: [PATCH] client: Fix defaulting to empty closure. --- share/webapp/js/ng.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/webapp/js/ng.js b/share/webapp/js/ng.js index dc3e1cbae..4aed6505d 100644 --- a/share/webapp/js/ng.js +++ b/share/webapp/js/ng.js @@ -189,6 +189,9 @@ mc.ng.timeout = function(timeout, closure) timeout = undefined; } + if(typeof(closure) != "function") + closure = () => {}; + //TODO: XXX: arbitrary let $timeout = mc.ng.timeout.$timeout; return $timeout(closure, timeout);