Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Commit

Permalink
Prevent case of JS error on 4.6 when statusButton doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
westonruter committed Feb 28, 2017
1 parent a268785 commit 383787c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/customize-snapshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,9 @@
// Set up toggling of the schedule container.
snapshot.snapshotEditContainerDisplayed.bind( function( isDisplayed ) {

snapshot.dateControl.toggle( 'future' === snapshot.statusButton.value.get() );
if ( snapshot.statusButton ) {
snapshot.dateControl.toggle( 'future' === snapshot.statusButton.value.get() );
}

if ( isDisplayed ) {
snapshot.editContainer.stop().slideDown( 'fast' ).attr( 'aria-expanded', 'true' );
Expand Down

0 comments on commit 383787c

Please sign in to comment.