fix bug where objects could not be edited
This commit is contained in:
Vendored
-3
@@ -949,14 +949,11 @@
|
||||
addObject = (messageObject) => {
|
||||
const existingObject = this.objects.value.get(messageObject.id);
|
||||
if (existingObject) {
|
||||
let didChangeObject = existingObject.title != messageObject.title;
|
||||
existingObject.title = messageObject.title;
|
||||
Object.values(messageObject.contentVersions).forEach((content) => {
|
||||
if (existingObject.contentVersions[content.id]) return;
|
||||
this.addObjectContent(existingObject, content);
|
||||
didChangeObject = true;
|
||||
});
|
||||
if (didChangeObject == false) return;
|
||||
this.objects.set(existingObject.id, existingObject);
|
||||
} else {
|
||||
this.objects.set(messageObject.id, messageObject);
|
||||
|
||||
@@ -351,14 +351,11 @@ export class Chat {
|
||||
addObject = (messageObject: MessageObject): void => {
|
||||
const existingObject = this.objects.value.get(messageObject.id);
|
||||
if (existingObject) {
|
||||
let didChangeObject = existingObject.title != messageObject.title;
|
||||
existingObject.title = messageObject.title;
|
||||
Object.values(messageObject.contentVersions).forEach((content) => {
|
||||
if (existingObject.contentVersions[content.id]) return;
|
||||
this.addObjectContent(existingObject, content);
|
||||
didChangeObject = true;
|
||||
});
|
||||
if (didChangeObject == false) return;
|
||||
this.objects.set(existingObject.id, existingObject);
|
||||
} else {
|
||||
this.objects.set(messageObject.id, messageObject);
|
||||
|
||||
Reference in New Issue
Block a user