[wp-trac] [WordPress Trac] #35878: In `wp.media.view.Attachment.render` tested parameter is missing a default.

WordPress Trac noreply at wordpress.org
Fri Mar 25 06:01:03 UTC 2016

#35878: In `wp.media.view.Attachment.render` tested parameter is missing a default.
 Reporter:  georgestephanis        |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  lowest                 |   Milestone:  Awaiting Review
Component:  Media                  |     Version:  4.2
 Severity:  minor                  |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  javascript

Comment (by adamsilverstein):

 Hmm, I see the same thing...  I'm not sure why PHP Storm is complaining.

 I don't think this is an issue in JavaScript, even if the property is
 undefined the conditional just returns false, we don't need an isset like
 PHP here. undefined works fine in conditionals :)


Ticket URL: <https://core.trac.wordpress.org/ticket/35878#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list