[wp-trac] [WordPress Trac] #41231: media-views.js: Cannot read .length of undefined (this.controller.$uploaderToggler.length)

WordPress Trac noreply at wordpress.org
Thu Jul 6 00:41:01 UTC 2017


#41231: media-views.js: Cannot read .length of undefined
(this.controller.$uploaderToggler.length)
-------------------------------------+-------------------------------------
 Reporter:  Blackbam                 |       Owner:  joemcgill
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  4.8.1
Component:  Media                    |     Version:  4.8
 Severity:  major                    |  Resolution:  fixed
 Keywords:  good-first-bug has-      |     Focuses:  accessibility,
  patch                              |  javascript, administration
-------------------------------------+-------------------------------------
Changes (by joemcgill):

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


Comment:

 In [changeset:"41009"]:
 {{{
 #!CommitTicketReference repository="" revision="41009"
 Sanity check $uploaderToggler in wp.media.view.UploaderInline.

 This ensures `$uploaderToggler` exists before checking length so any views
 extending or scripts accessing this view, won't encounter errors that stop
 execution.

 Props Blackbam, yahil.
 Fixes #41231.
 }}}

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


More information about the wp-trac mailing list