mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
Show correct importer context objects
refs #9584 - object by reference 🎡 - we modify the object later on - this has resulted in a wrong context output in the admin client - e.g. we've output an updated user reference
This commit is contained in:
parent
f9ffc395c0
commit
2667ad366c
@ -199,7 +199,7 @@ class Base {
|
||||
// CASE: you import null, fallback to owner
|
||||
if (!obj[key]) {
|
||||
if (!userReferenceProblems[obj.id]) {
|
||||
userReferenceProblems[obj.id] = {obj: obj, keys: []};
|
||||
userReferenceProblems[obj.id] = {obj: _.cloneDeep(obj), keys: []};
|
||||
}
|
||||
|
||||
userReferenceProblems[obj.id].keys.push(key);
|
||||
@ -217,7 +217,7 @@ class Base {
|
||||
// CASE: fallback to owner
|
||||
if (!existingUser) {
|
||||
if (!userReferenceProblems[obj.id]) {
|
||||
userReferenceProblems[obj.id] = {obj: obj, keys: []};
|
||||
userReferenceProblems[obj.id] = {obj: _.cloneDeep(obj), keys: []};
|
||||
}
|
||||
|
||||
userReferenceProblems[obj.id].keys.push(key);
|
||||
@ -264,7 +264,7 @@ class Base {
|
||||
|
||||
if (!existingUser) {
|
||||
if (!userReferenceProblems[obj.id]) {
|
||||
userReferenceProblems[obj.id] = {obj: obj, keys: []};
|
||||
userReferenceProblems[obj.id] = {obj: _.cloneDeep(obj), keys: []};
|
||||
}
|
||||
|
||||
userReferenceProblems[obj.id].keys.push(key);
|
||||
|
Loading…
Reference in New Issue
Block a user