Null check around my apps change.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4783 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
Cory McWilliams 2024-01-19 02:17:09 +00:00
parent cf311003c0
commit 1ddad6be93

View File

@ -31,8 +31,11 @@ async function fetch_shared_apps() {
}); });
let result = {}; let result = {};
for (let app of Object.values(messages).sort((x, y) => y.message.timestamp - x.message.timestamp)) { for (let app of Object.values(messages).sort((x, y) => y.message.timestamp - x.message.timestamp)) {
result[app.name] = JSON.parse(utf8Decode(await ssb.blobGet(app.blob))); let app_object = JSON.parse(utf8Decode(await ssb.blobGet(app.blob)));
result[app.name].blob_id = app.blob; if (app_object) {
app_object.blob_id = app.blob;
result[app.name] = app_object;
}
} }
return result; return result;
} }