Hello,

I have a macro definition that invokes a widget that I'm developing. The 
default value of the tokens parameter is the empty string. This is the 
macro definition


\define codereveal( tokens:"" )
<$reveal type="match" state=<<qualify "$:/status/$(currentTiddler)$">> 
text="open">
<$codeLine language="ipx" code={{!!text}} tokens=$tokens$/>
</$reveal>
\end


Then I'm getting that value in the widget like this:
 this.userTokens = this.getAttribute("tokens") || undefined;
 console.log(this.userTokens);


But instead of getting what I expect ("" || undefined = undefined ), 
undefined for empty string ("") im getting true. Why?

thanks tgo all

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to