diff options
author | kpdecker <kpdecker@gmail.com> | 2015-08-18 23:13:15 -0700 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2015-08-18 23:13:15 -0700 |
commit | 958273c2e6407b1174b212c4eccbcb8f72494c99 (patch) | |
tree | 497988463e6be7ba2a8282c6313fe16f4550bd7b | |
parent | 1c2b74e537409e5672d587f1df19730d9766151d (diff) | |
download | handlebars.js-958273c2e6407b1174b212c4eccbcb8f72494c99.zip handlebars.js-958273c2e6407b1174b212c4eccbcb8f72494c99.tar.gz handlebars.js-958273c2e6407b1174b212c4eccbcb8f72494c99.tar.bz2 |
Add object option to test runner
-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] }); |