Un-fix hasOwn bug

This commit is contained in:
Jon Staab 2024-02-14 08:36:27 -08:00
parent fb9b48dc12
commit fba1137f96
3 changed files with 7 additions and 6 deletions

View File

@ -68,7 +68,7 @@
</div>
</MenuDesktopItem>
{/if}
<MenuDesktopItem path="/notifications">
<MenuDesktopItem path="/notifications" disabled={!$canSign}>
<div class="relative inline-block">
Notifications
{#if $hasNewNotifications}

View File

@ -151,7 +151,7 @@ export class LocalStorageAdapter {
const {key, store, opts} = this
const {load, dump} = opts || {load: identity, dump: identity}
if (Object.hasOwnProperty(localStorage, key)) {
if (Object.hasOwn(localStorage, key)) {
store.set(load(LocalStorage.getJson(key)))
}

View File

@ -18,10 +18,11 @@ const createReadReceipt = ids =>
export const markAsSeenPublicly = batch(5000, async idChunks => {
for (const ids of chunk(500, uniq(flatten(idChunks)))) {
Publisher.publish({
event: await signer.get().signAsUser(createReadReceipt(ids)),
relays: getUserHints("write"),
})
const event = await signer.get().signAsUser(createReadReceipt(ids))
if (event) {
Publisher.publish({event, relays: getUserHints("write")})
}
}
})