🐛 Fixed "Cannot destructure property" error when overwriting active theme

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`
This commit is contained in:
Kevin Ansfield 2021-07-09 19:27:49 +01:00
parent 6bb10e6d4b
commit 4235753e95

View File

@ -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;
});
}