Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#30218 closed defect (bug) (fixed)

_.isUndefined( _wpRevisionsSettings ); should be _.isUndefined( window._wpRevisionsSettings );

Reported by: ericlewis's profile ericlewis Owned by: wonderboymusic's profile wonderboymusic
Milestone: 4.1 Priority: normal
Severity: normal Version: 3.6
Component: Revisions Keywords: has-patch commit
Focuses: javascript Cc:

Description

This will bail on a JS TypeError if _wpRevisionsSettings is undefined.

Attachments (2)

30218.diff (595 bytes) - added by ericlewis 10 years ago.
30218.2.diff (556 bytes) - added by ericlewis 10 years ago.

Download all attachments as: .zip

Change History (5)

@ericlewis
10 years ago

@ericlewis
10 years ago

#1 @ericlewis
10 years ago

attachment:30218.2.diff uses the "is defined else" pattern we use elsewhere in JS.

#2 @ericlewis
10 years ago

  • Keywords commit added

#3 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 30130:

Set revision.settings via short-circuit check for window property: window._wpRevisionsSettings || {}

Props ericlewis.
Fixes #30218.

Note: See TracTickets for help on using tickets.