Open lionel-bijaoui opened 2 years ago
Thanks! Could you provide the code that's causing the crash?
It was fairly hard to get the origin.
Here is the AST fragment
<ref *2> {
type: 'PrivateIdentifier',
name: 'route',
range: [ 5391, 5420 ],
loc: { start: { line: 159, column: 39 }, end: { line: 159, column: 68 } },
parent: <ref *1> {
type: 'MemberExpression',
object: {
type: 'ThisExpression',
range: [Array],
loc: [Object],
parent: [Circular *1]
},
property: [Circular *2],
computed: false,
optional: false,
range: [ 5386, 5420 ],
loc: { start: [Object], end: [Object] },
parent: {
type: 'BinaryExpression',
operator: '+',
left: [Circular *1],
right: [Object],
range: [Array],
loc: [Object],
parent: [Object]
}
}
}
And the code is using a private member of a class. Here is an extract of the class
export class example {
#route = null;
template(args) {
this.#route = args.route || null;
if (this.#route != null) {
this.#route += "/";
}
return ``;
}
onRender() {
let footer = "";
footer = (
<footer class="text-center padding-10">
<a class="button" fk-href={this.#route + "container-preparation/list/upcoming"}>
<svg>
<use xlink:href="#eye" />
</svg>{" "}
See more
</a>
</footer>
);
return footer;
}
}
Looks like this has the same testing problem as #112.
We'll have to upgrade the test suite to be able to parse private fields before fixing this.
A workaround in the meantime would be making the href value in a variable, and only putting the variable name inside the prop.
Thank you for your time and your help.
This is not a big problem, but tell me if I can help to fix it 😄
Hello, I'm raising an issue as instructed by the error message.
What info do you need ? Can I help ? Thank you for your time