Hi
Affects taconite 3.65 to 3.66.
Since the introduction of 3.65 a bug has occurred. When trying to assign an empty value or a value with a leading 0, taconite will assign a different value. This bug did not occur in 3.64.
HTML to replicate bug
<input id = 'textInput' type = 'text' value = ''/>
XML to replicate bug
<taconite>
<!--Will assign '0' to the input value when the value should be empty -->
<attr select = '#textInput' name = 'value' value =''/>
<!--Will assign '12345' to the input value when the value should be '012345'-->
<attr select = '#textInput' name = 'value' value ='012345'/>
</taconite>
The Fix
Assigning the value to type primitive type Number seems to be causing the issue. I'm unsure why this is done to be honest, surely its better just to assign the value specified in the XML document.
The offending lines causing this issue is between 290 - 295.
/*Replace this */
if (v !== null) {
tmp = Number(v);
if (v == tmp)
v = tmp;
a.push(v);
}
/*With this*/
if (v !== null) a.push(v);
Also lines 303 - 307.
/*Comment these lines out */
if (v.length) {
tmp = Number(v);
if (v == tmp)
v = tmp;
}
Hi
Affects taconite 3.65 to 3.66.
Since the introduction of 3.65 a bug has occurred. When trying to assign an empty value or a value with a leading 0, taconite will assign a different value. This bug did not occur in 3.64.
HTML to replicate bug
XML to replicate bug
The Fix
Assigning the value to type primitive type Number seems to be causing the issue. I'm unsure why this is done to be honest, surely its better just to assign the value specified in the XML document.
The offending lines causing this issue is between 290 - 295.
Also lines 303 - 307.