You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty string is falsy and as such it the code snippet correctly falls back to nothing when using ||, therefore removing the attribute.
See this playground example. If you inspect the <p> element, foo attribute does not exist, but bar does.
I also do not see any attribute on the <button> element in the provided stackblitz example either.
In the documentation on expressions it says the following:
Empty string
''
is truthy. So an empty string will leave the attribute in place.This is the demo snippet in the documentation.
This will leave the attribute in place if
ariaLabel=''
.https://stackblitz.com/edit/vitejs-vite-d25wmw?file=package.json
The text was updated successfully, but these errors were encountered: