From 1ee973e2e2d36f4e550d5fac9582ff1c71fc03ea Mon Sep 17 00:00:00 2001 From: Adam Silverstein Date: Sun, 7 Jan 2018 10:06:14 -0500 Subject: [PATCH] Unnest autosave check --- editor/components/provider/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/editor/components/provider/index.js b/editor/components/provider/index.js index cd0b9f6438d0f..55dae4ccf00b3 100644 --- a/editor/components/provider/index.js +++ b/editor/components/provider/index.js @@ -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 ) ); } }