Skip to content

Commit 1ee973e

Browse files
Unnest autosave check
1 parent 58a498f commit 1ee973e

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

editor/components/provider/index.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ class EditorProvider extends Component {
5252
// Assume that we don't need to initialize in the case of an error recovery.
5353
if ( ! props.recovery ) {
5454
this.store.dispatch( setupEditor( props.post, this.settings ) );
55-
if ( props.autosave ) {
56-
this.store.dispatch( showAutosaveAlert( props.autosave ) );
57-
}
55+
}
56+
57+
// Display a notice if an autosave exists.
58+
if ( props.autosave ) {
59+
this.store.dispatch( showAutosaveAlert( props.autosave ) );
5860
}
5961
}
6062

0 commit comments

Comments
 (0)