[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 :)

 [[Image(http://cl.ly/0x0M360M3838/35878_In_wp.media.view.Attachment.render_tested_parameter_is_missing_a_default.__WordPress_Trac_2016-03-24_23-58-53.jpg)]]

--
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