glimmerjs / glimmer-vm

MIT License
1.13k stars 190 forks source link

`undefined`, `true`, `false`, `null` property names in context does not work #1280

Open lifeart opened 3 years ago

lifeart commented 3 years ago

image

image

image

rwjblue commented 3 years ago

I think these will have to be fixed in @handlebars/parser. For now you can work around via (get this 'undefined').

lifeart commented 3 years ago

still not working for glimmerx

image

https://glimmerjs.github.io/glimmer-experimental/?snippet=%0Aimport+Component%2C+%7B+hbs%2C+tracked+%7D+from+%27%40glimmerx%2Fcomponent%27%3B%0Aimport+%7B+on%2C+action+%7D+from+%27%40glimmerx%2Fmodifier%27%3B%0A%0Aexport+default+class+HelloWorld+extends+Component+%7B%0A++%40tracked+count+%3D+1%3B%0A%0A++%40action+increment%28%29+%7B%0A++++this.count%2B%2B%3B%0A++%7D%0A%0A++static+template+%3D+hbs%60%0A++++%3Ch1%3EWelcome+to+the+GlimmerX+Playground%21%3C%2Fh1%3E%0A++++%7B%7Bthis.undefined%7D%7D%0A++++%3Cp%3EYou+have+clicked+the+button+%7B%7Bthis.count%7D%7D+times.%3C%2Fp%3E%0A%0A++++%3Cbutton+%7B%7Bon+%22click%22+this.increment%7D%7D%3EClick%3C%2Fbutton%3E%0A++%60%3B%0A%7D%0A

image