salesforce / lwc

⚡️ LWC - A Blazing Fast, Enterprise-Grade Web Components Foundation
https://lwc.dev
Other
1.6k stars 386 forks source link

fix(class): avoid enumerable prototype for class object binding @W-16109991@ #4337

Closed wjhsf closed 1 week ago

wjhsf commented 1 week ago

Details

We currently iterate over all enumerable properties on an object, not just own enumerable properties. This breaks anything using LBC's classSet utility, because that has enumerable props on the prototype. Anything using that helper will see add invert toString added to their class. Oops!

Does this pull request introduce a breaking change?

Technically, but it's a bug fix!

Does this pull request introduce an observable change?

GUS work item

W-16109991