From 4872d1983db04d685de1816a81177caba5a36903 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 3 Aug 2021 12:16:30 +0400 Subject: [PATCH] Editor: Safer isPreviewingPost check (#33840) --- 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 e1ef7783cd6fb..00d3e6527a71c 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' ] ); } /**