From 842f7549e828855930f4725becd1ce5309259250 Mon Sep 17 00:00:00 2001 From: Jeff Ong Date: Mon, 4 Dec 2023 12:00:14 -0500 Subject: [PATCH] Check response.errors.length. --- .../src/components/global-styles/font-library-modal/context.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/edit-site/src/components/global-styles/font-library-modal/context.js b/packages/edit-site/src/components/global-styles/font-library-modal/context.js index 33a5b0910f0526..58b8621adcf0c3 100644 --- a/packages/edit-site/src/components/global-styles/font-library-modal/context.js +++ b/packages/edit-site/src/components/global-styles/font-library-modal/context.js @@ -229,7 +229,7 @@ function FontLibraryProvider( { children } ) { // Uninstall the font (remove the font files from the server and the post from the database). const response = await fetchUninstallFonts( [ font ] ); // Deactivate the font family (remove the font family from the global styles). - if ( ! response.errors ) { + if ( 0 === response.errors.length ) { deactivateFontFamily( font ); // Save the global styles to the database. await saveSpecifiedEntityEdits(