From 4235753e95045ad7b3bab69c63b3379a88638b34 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Fri, 9 Jul 2021 19:27:49 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20"Cannot=20destructure=20?= =?UTF-8?q?property"=20error=20when=20overwriting=20active=20theme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refs https://github.com/TryGhost/action-deploy-theme/issues/45 - added missing `throw error` in the `setFromZip()` catch which was hiding the underlying error when a theme uploaded and saved successfully but other code had failed - fixed incorrect method name `activator.activateFromOverride` -> `activator.activateFromAPIOverride` --- core/server/services/themes/storage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/server/services/themes/storage.js b/core/server/services/themes/storage.js index 880117a276..6be9d1eb1c 100644 --- a/core/server/services/themes/storage.js +++ b/core/server/services/themes/storage.js @@ -81,7 +81,7 @@ module.exports = { // CASE: if this is the active theme, we are overriding if (overrideTheme) { debug('setFromZip Theme is active alreadu'); - activator.activateFromOverride(themeName, loadedTheme, checkedTheme); + activator.activateFromAPIOverride(themeName, loadedTheme, checkedTheme); } // @TODO: unify the name across gscan and Ghost! @@ -98,6 +98,8 @@ module.exports = { throw error; }); } + + throw error; }); }