From 2231a1676eda2220706fcc85825e6839b5836af9 Mon Sep 17 00:00:00 2001 From: Peter Ehrlich Date: Thu, 13 Nov 2014 17:54:09 -0800 Subject: [PATCH] Fixes #190 Cannot pass in Leap.loop options without callback --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index bc258988..0ac79e2f 100644 --- a/lib/index.js +++ b/lib/index.js @@ -50,7 +50,7 @@ module.exports = { * ``` */ loop: function(opts, callback) { - if (opts && callback === undefined && (!opts.frame && !opts.hand)) { + if (opts && callback === undefined && ( ({}).toString.call(opts) === '[object Function]' ) ) { callback = opts; opts = {}; }