diff options
Diffstat (limited to 'spec/env/common.js')
-rw-r--r-- | spec/env/common.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/env/common.js b/spec/env/common.js index f2c9dc6..111294c 100644 --- a/spec/env/common.js +++ b/spec/env/common.js @@ -29,7 +29,10 @@ global.compileWithPartials = function(string, hashOrArray, partials) { var template, ary, options; - if (Object.prototype.toString.call(hashOrArray) === '[object Array]') { + if (hashOrArray && hashOrArray.hash) { + ary = [hashOrArray.hash, hashOrArray]; + delete hashOrArray.hash; + } else if (Object.prototype.toString.call(hashOrArray) === '[object Array]') { ary = []; ary.push(hashOrArray[0]); ary.push({ helpers: hashOrArray[1], partials: hashOrArray[2] }); |