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:
parent
9810c41dca
commit
0074324b10
1 changed files with 5 additions and 1 deletions
|
@ -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({
|
||||
|
|
Loading…
Add table
Reference in a new issue