lwc
lwc copied to clipboard
(template-compiler) Quote empty parentheses as attribute value fails compilation
Description
Attribute value of "{}"
was previously not being treated as an expression value and hence passed compilation with out an error.
<template>
<h1>Hello world!</h1>
<div data-foo="{}"></div>
</template>
This change was introduced in this pr https://github.com/salesforce/lwc/pull/3376/files#diff-068f1f2f0aba9934781faf5a43f0a2eb38351062f092def1194e83c21cec689cR25
Steps to Reproduce
Use the markup provided with lwc v2.41.0 and it will throw a Ambiguous attribute value...
error. Prior versions of lwc worked fine.
https://stackblitz.com/edit/salesforce-lwc-lhgqku?file=src%2Fmodules%2Fx%2Fapp%2Fapp.html,package.json&title=LWC%20playground
Version
- LWC: 2.41.0
@ravijayaramappa Can this be closed? Or is there still something to do?
@ravijayaramappa Closing, as I believe you addressed this issue. Please reopen and update description with specifics if there is remaining work.