mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 03:44:29 +03:00
Fixed incorrect codeinjection_* assignment
no issue - discovered while testing
This commit is contained in:
parent
e109c54245
commit
e79fc9a9be
@ -47,13 +47,13 @@ module.exports.forSettings = (attrs, frame) => {
|
||||
|
||||
// CASE: edit
|
||||
if (frame.original.body && frame.original.body.settings) {
|
||||
frame.original.body.settings.forEach((setting, index) => {
|
||||
frame.original.body.settings.forEach((setting) => {
|
||||
if (setting.key === 'codeinjection_head') {
|
||||
attrs[index].key = 'codeinjection_head';
|
||||
}
|
||||
|
||||
if (setting.key === 'codeinjection_foot') {
|
||||
attrs[index].key = 'codeinjection_foot';
|
||||
const target = _.find(attrs, {key: 'ghost_head'});
|
||||
target.key = 'codeinjection_head';
|
||||
} else if (setting.key === 'codeinjection_foot') {
|
||||
const target = _.find(attrs, {key: 'ghost_foot'});
|
||||
target.key = 'codeinjection_foot';
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user