datacommonsorg / website

Code for the Data Commons website
https://datacommons.org
Apache License 2.0
20 stars 73 forks source link

Fixed issue when .removeAttribute called on a web component's convertArrayAttribute property #4391

Closed dwnoble closed 1 week ago

dwnoble commented 1 week ago

Fixes this error in UN staging site:

Screenshot 2024-06-25 at 12 54 32 AM

Impacts lit elements with properties with decorator:

@property({ type: Array<string>, converter: convertArrayAttribute })

When React removes a property from an element, it calls <domElement>.removeAttribute. This then calls convertArrayAttribute(undefined), which was causing an exception.

TODO: add webdriver unit test for this case