I'm attempting to write a Meteor package which can be placed inside templates. So I first attempted to register a helper.
Template.registerHelper('testHelper', function(a, b) {
console.log(a);
console.log(b);
})
I've added the package inside /packages
, and in my client template, when I added {{testHelper "hello" "meow"}}
, the console logged hello
and meow
, which is what I expected.
When I added {{testHelper "hello"}}
, I expected the console to log hello
and null
, since nothing was passed as the second parameter. But instead it returned hello
and an object - Spacebars.kw {hash: Object}
What is this Spacebars.kw {hash: Object}
? What can I do if I want it to return null
instead?
Spacebars.kw
documented? I can't find it in the docs, maybe we can add this to the docs? – Atomizer