0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-18 02:21:47 -05:00

Fixed migration when brand setting is null

refs #10318

This would throw if the setting was null, we catch and use the default
instead.
This commit is contained in:
Fabien O'Carroll 2020-06-30 18:29:52 +02:00
parent 9810c41dca
commit 0074324b10

View file

@ -16,7 +16,11 @@ const renameMappings = [{
from: 'brand',
to: 'accent_color',
getToValue: (fromValue) => {
return JSON.parse(fromValue).primaryColor || '';
try {
return JSON.parse(fromValue).primaryColor || '';
} catch (err) {
return '';
}
},
getFromValue: (toValue) => {
return JSON.stringify({