From 5b06a2d8f51dbca8debf3b204833c3fe08f53f75 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 10 Jan 2023 09:18:27 +0400 Subject: [PATCH] Cast actions array to boolean --- packages/edit-site/src/components/global-styles/screen-root.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/global-styles/screen-root.js b/packages/edit-site/src/components/global-styles/screen-root.js index 329c0822c8792..58f6fd37a4fc1 100644 --- a/packages/edit-site/src/components/global-styles/screen-root.js +++ b/packages/edit-site/src/components/global-styles/screen-root.js @@ -40,7 +40,8 @@ function ScreenRoot() { return { variations: __experimentalGetCurrentThemeGlobalStylesVariations(), - canEditCSS: globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false, + canEditCSS: + !! globalStyles?._links?.[ 'wp:action-edit-css' ] ?? false, }; }, [] );