WordPress.org

Make WordPress Core

Opened 17 months ago

Last modified 2 months ago

#45810 reviewing enhancement

JavaScript type comparison should not lead to a type coercion

Reported by: subrataemfluence Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 5.0.2
Component: Administration Keywords: has-patch 2nd-opinion
Focuses: javascript, coding-standards Cc:

Description

Although typeof jQuery!='undefined' would not lead to any type conversion I think it is always better to be on a safer side by writing it as typeof jQuey !== 'undefined'.

I hope this will make the type comparison more concrete.

Attachments (1)

45810.diff (941 bytes) - added by subrataemfluence 17 months ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
17 months ago

  • Component changed from General to Administration
  • Focuses javascript added

#2 @SergeyBiryukov
17 months ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
2 months ago

  • Milestone changed from Future Release to 5.5
Note: See TracTickets for help on using tickets.