[Webkit-unassigned] [Bug 212449] Javascript engine gets confused, calls method on wrong object.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 27 21:08:35 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=212449
--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
(In reply to Yusuke Suzuki from comment #3)
> This is https://bugs.webkit.org/show_bug.cgi?id=38970
>
> Since Object.render is defined as non-enumerable property, for-in for
> PayrollRemittanceAgencyEventWizard is listing "render".
>
> You can avoid this issue if,
>
> 1. you define render etc. in Object with enumerable: false.
Object.prototype.
>
> Or
>
> 2. If options is truly a shallow option object, you can change
>
> TTBackboneView#initialize
>
> initialize( options ) {
> //Convert options object to this object properties as early as possible.
> if ( options && typeof options == 'object' ) {
> for ( const property in options ) {
> this[property] = options[property];
> }
> }
> }
>
> to
>
> initialize( options ) {
> //Convert options object to this object properties as early as possible.
> if ( options && typeof options == 'object' ) {
> for ( const property in options ) {
> if (options.hasOwnProperty(property))
> this[property] = options[property];
> }
> }
> }
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200528/5937b407/attachment.htm>
More information about the webkit-unassigned
mailing list