- {#each recipe?.categories || [] as categoryId}
+ {#each recipe?.categories ?? [] as categoryId}
category.id === categoryId)?.name || '?'}
+ title={categories.find(category => category.id === categoryId)?.name ?? '?'}
classes="bg-[var(--pd-label-bg)] p-1 text-xs w-fit" />
{/each}
diff --git a/packages/shared/src/messages/MessageProxy.ts b/packages/shared/src/messages/MessageProxy.ts
index a269a7d66..37ef4f516 100644
--- a/packages/shared/src/messages/MessageProxy.ts
+++ b/packages/shared/src/messages/MessageProxy.ts
@@ -151,7 +151,7 @@ export class RpcBrowser {
return;
}
- const { resolve, reject } = this.promises.get(message.id) || {};
+ const { resolve, reject } = this.promises.get(message.id) ?? {};
if (message.status === 'error') {
reject?.(message.error);
@@ -205,7 +205,7 @@ export class RpcBrowser {
// Add some timeout
if (!noTimeoutChannels.includes(channel)) {
setTimeout(() => {
- const { reject } = this.promises.get(requestId) || {};
+ const { reject } = this.promises.get(requestId) ?? {};
if (!reject) return;
reject(new Error('Timeout'));
this.promises.delete(requestId);