From 5bc77ce8f4ad9f53a2c1156dbfb3aa252d119de9 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 3 Aug 2021 10:46:57 +0400 Subject: [PATCH] Editor: Safer isPreviewingPost check --- packages/editor/src/store/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/editor/src/store/selectors.js b/packages/editor/src/store/selectors.js index e1ef7783cd6fbd..00d3e6527a71c4 100644 --- a/packages/editor/src/store/selectors.js +++ b/packages/editor/src/store/selectors.js @@ -890,7 +890,7 @@ export function isPreviewingPost( state ) { if ( ! isSavingPost( state ) ) { return false; } - return !! state.saving.options.isPreview; + return !! get( state.saving, [ 'options', 'isPreview' ] ); } /**