center: fix

This commit is contained in:
undefined committed 2024-08-12 16:48:58 +08:00
1 parent 2dcf086168
commit e3a12983e9
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -63,7 +63,7 @@ class DataReportHandler extends Handler {
sandbox: payload.sandbox,
dbVersion: payload.dbVersion,
};
if (old.notification) setPayload.notification = '';
if (old?.notification) setPayload.notification = '';
if (old && lt(payload.version, old.version)) {
await coll.updateOne(
{ _id: installId },
@@ -86,7 +86,7 @@ class DataReportHandler extends Handler {
this.ctx.emit('center/report', this, installId, old, payload);
// TODO deliver messages
this.response.body = { code: 0 };
if (old.notification) this.response.body.notification = old.notification;
if (old.notification) this.response.body.notification = old?.notification;
}
}