On Monday, March 13, 2017 at 10:15:52 AM UTC+1, tejjyid wrote:
>
> OK, but I can accidentally return an undefined paramenter any time,
> surely?
>
If you define your params like this. eg:
exports.params = [
{"name":"tag", "default":""},
{"name":"label", "default":"<$view field='title' format='text' />"},
{"name":"tooltip", "default":""},
{"name":"debug"}
];
Since params has to exist, there shouldn't be an accidents.
> This slightly unexpected behaviour only protects against variables named
> in the function definition?
>
kind of. There is no mechanism in js, that tells you about returning
undefined variables. The developer has to take care for this.
> Also, I notice Jeremy says "undefined".
>
IMO it should show, that undefined is a string. In js undefined is the
default state, if you define are variable, without initialisation.
undefined is not equal to the string "undefined"
-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/35fb8500-346e-4841-ace5-8ff91e18ec29%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.