From ddacd0a98af10eb45e91edff8ecb700b766809cd Mon Sep 17 00:00:00 2001 From: Carsten Milling Date: Sun, 17 Mar 2013 19:20:10 +0100 Subject: [PATCH] fix iteration of arrays in wrapAsyncFunctions() --- lib/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/script.js b/lib/script.js index 1b6d262..e90b33f 100644 --- a/lib/script.js +++ b/lib/script.js @@ -198,7 +198,7 @@ function wrapAsyncFunctions(asyncFunctions, sandbox, events, done, sandboxRoot) return result; } }; - } else if (typeof asyncFunctions[k] === 'object') { + } else if (typeof asyncFunctions[k] === 'object' && !(asyncFunctions[k] instanceof Array)) { sandbox[k] = sandbox[k] || {}; wrapAsyncFunctions(asyncFunctions[k], sandbox[k], events, done, sandboxRoot); } else {