Skip to content

Commit

Permalink
Unnest autosave check
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Silverstein committed Jan 7, 2018
1 parent 58a498f commit 1ee973e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions editor/components/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ class EditorProvider extends Component {
// Assume that we don't need to initialize in the case of an error recovery.
if ( ! props.recovery ) {
this.store.dispatch( setupEditor( props.post, this.settings ) );
if ( props.autosave ) {
this.store.dispatch( showAutosaveAlert( props.autosave ) );
}
}

// Display a notice if an autosave exists.
if ( props.autosave ) {
this.store.dispatch( showAutosaveAlert( props.autosave ) );
}
}

Expand Down

0 comments on commit 1ee973e

Please sign in to comment.