Closed jantimon closed 3 years ago
I have a template which works in AEM (java) and worked with @adobe/htlengine 5.1.0:
<sly data-sly-test="" data-sly-use.headline="./headline.htl" > Hello world </sly> <sly data-sly-test="" data-sly-use.headline="./headline.htl" > Hello world </sly>
In 5.1.0 it added the variable headline inside the if (from data-sly-test):
headline
data-sly-test
const var_testVariable0 = ""; if (var_testVariable0) { const headline = $.template('src/headline.htl'); $.dom.text($n,"\n Hello world\n"); }
In 6.3.0 it adds the variable headline outside the if (from data-sly-test):
const var_testVariable1 = ""; const headline = $.template('src/headline.htl'); if (var_testVariable1) { $.dom.text($n,"\n Hello world\n");
So in 6.3.0 this will produce multiple headline variables in the same scope Therefore node will throw the following exception:
Identifier 'headline' has already been declared (60:10)
:tada: This issue has been resolved in version 6.3.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for your fast support - the bug disappeared with 6.3.2! :)
I have a template which works in AEM (java) and worked with @adobe/htlengine 5.1.0:
In 5.1.0 it added the variable
headline
inside the if (fromdata-sly-test
):In 6.3.0 it adds the variable
headline
outside the if (fromdata-sly-test
):So in 6.3.0 this will produce multiple
headline
variables in the same scopeTherefore node will throw the following exception:
Identifier 'headline' has already been declared (60:10)