Opened 12 years ago
Closed 12 years ago
#22113 closed enhancement (fixed)
Checking for the 'wp' JavaScript variable could be simpler
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.5 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
In a few places we do this:
if ( typeof wp === 'undefined' ) var wp = {};
That could be simplified to a one liner that's easier to read:
window.wp = window.wp || {};
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Nice patch.