JS macros can specify a default value for each parameter; otherwise you'll see 
"undefined" as the value. For example:
exports.params = [ {name: "title", "default": "My title"} ];
Note that the property name "default" must be in quotes because it is a 
built-in keyword.

Best wishes

Jeremy

---
Jeremy Ruston
[email protected]
http://jermolene.com



--
Jeremy Ruston
[email protected]
http://jermolene.com
> On 11 Mar 2017, at 09:33, PMario <[email protected]> wrote:
> 
>> On Saturday, March 11, 2017 at 6:50:06 AM UTC+1, tejjyid wrote:
>> It seems that when I execute a JS macro with an unsupplied parameter, it's 
>> set to "" rather than undefined. Is that always the case?
> 
> Yes. 
> 
> Macros return text and we need to be 100% compatible with wikitext macros. 
> They work that way. 
> 
> -m
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/tiddlywiki.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/tiddlywiki/39653d8f-9e02-4269-9f4d-2255e6adc6e9%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/F7C4212E-4CFC-4943-AFDA-772AF533AF8E%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to