[wp-trac] [WordPress Trac] #53856: Check if the 'mirroring' property exists in media-views.js

WordPress Trac noreply at wordpress.org
Fri Feb 4 12:56:09 UTC 2022


#53856: Check if the 'mirroring' property exists in media-views.js
-------------------------------------+-------------------------------------
 Reporter:  MMDeveloper              |       Owner:  joedolson
     Type:  defect (bug)             |      Status:  reopened
 Priority:  normal                   |   Milestone:  6.0
Component:  Media                    |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-         |     Focuses:  javascript,
  testing-info needs-testing         |  administration
-------------------------------------+-------------------------------------
Changes (by SergeyBiryukov):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Is there a reason not to just check `if ( this.collection.mirroring && ...
 )` here?

 Seems more consistent with
 [source:tags/5.9/src/js/media/models/attachments.js?marks=249,261,277,301,321,374,391#L241
 seven similar checks in models/attachments.js], and I think it doesn't
 matter in this case if the property is directly assigned or inherited,
 just that it exists.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53856#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list