Html VAR{text} undefined

Hello,

My button's html shows two different texts depending on a fader's value.

Fader uses setVar to define this variable 'text'.

So i set button's html to <h1> VAR{text} </h1>. h1 is ok in its definition.

It's ok, but...

As i have this in my fader's script :

if(locals.valeurprecedente !== undefined)                              
  {
  if(locals.valeurprecedente > value) {setVar('button_9','text','Expire')}         
  else if(locals.valeurprecedente < value) {setVar('button_9','text','Inspire')}
  }


locals.valeurprecedente = value

It loads with undefined as text...

in button's html, i tried something like
#{VAR{text} !== undefined} "<h1> VAR{text} </h1>" : "Hello"}

It starts well, with a nice Hello... but then shows "__VARS.Expire" or "__VARS.Inspire". when all the process is on.

How to have just my two words without this added "__VARS." ?...

Why not just writing <h1>VAR{text, Hello}</h1> ?


#{VAR{text} !== undefined} "<h1> VAR{text} </h1>" : "Hello"}

There are syntax errors here, should be be something like

#{VAR{text} !== undefined ? "<h1>" + VAR{text} + "</h1>" : "Hello"}

Thank you very much :+1:, it make sense to me now (I tried to use a "string concatenation" in the css field, using JS{{var html='' ....}}).

I need the second version cause my "hello" goes with an < h2 >.