I think I should listen to the guy here who always tells me "post code"!
1st, thanks for the new information. I hadn't previously seen the mechanism for adding default values through params; that's neat.
The specific scenario I was envisaging looks a bit like this:
exports.params = [
{"name":"p1"},
{"name":"p2"}
];
exports.run = function(p1, p2) {
console.log(typeof p2);
console.log(p2);
};
Then a tiddler containing:
<<demo "p1 data">>
results in a console log of String and nothing else.
According to my reading on JS, what I should see is undefined undefined.
If I understand you correctly, what you are saying is that TW overrides JS default behaviour in case someone tries to
return p2;
incorrectly?