null
/undefined
value does not remove xlink:
/xml:
attribute
#3502
Labels
null
/undefined
value does not remove xlink:
/xml:
attribute
#3502
Description
Setting an attribute to a value of
null
orundefined
will typically cause aremoveAttribute
call in LWC. However, this doesn't work for svg/xml namespace attributes (repro).Template:
Result:
Expected result:
The root cause is these lines of code. Note that svg/xml namespace attributes will never result in a
removeAttribute
:lwc/packages/@lwc/engine-core/src/framework/modules/attrs.ts
Lines 39 to 49 in def03ea
Note that fixing this would be an observable change.
The text was updated successfully, but these errors were encountered: