throw if you try to mkAsync a non-function

This commit is contained in:
ansuz committed 2020-02-03 18:30:29 -05:00
1 parent 65ba85d97b
commit d1c6e67d17
1 file changed
+3
+3
View File
@@ -34,6 +34,9 @@
};
Util.mkAsync = function (f) {
if (typeof(f) !== 'function') {
throw new Error('EXPECTED_FUNCTION');
}
return function () {
var args = Array.prototype.slice.call(arguments);
setTimeout(function () {