throw if you try to mkAsync a non-function
parent
65ba85d97b
commit
d1c6e67d17
|
@ -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 () {
|
||||
|
|
Loading…
Reference in New Issue