mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-02-24 04:00:59 +01:00
web: fix type errors
This commit is contained in:
@@ -50,6 +50,7 @@ function Header(props: HeaderProps) {
|
||||
const id =
|
||||
(await db.tags.find(value))?.id ??
|
||||
(await db.tags.add({ title: value }));
|
||||
if (!id) return;
|
||||
await db.relations.add({ id, type: "tag" }, { type: "note", id: noteId });
|
||||
await useTagStore.getState().refresh();
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ export const AddNotebookDialog = DialogManager.register(
|
||||
title: title.current,
|
||||
description: description.current
|
||||
});
|
||||
if (!id) return;
|
||||
|
||||
if (parentId) {
|
||||
await db.relations.add(
|
||||
{ type: "notebook", id: parentId },
|
||||
|
||||
@@ -22,7 +22,7 @@ const FEATURE_CHECKS = {
|
||||
cache: false,
|
||||
indexedDB: false,
|
||||
clonableCryptoKey: false,
|
||||
applePaySupported: window.ApplePaySession?.canMakePayments()
|
||||
applePaySupported: !!window.ApplePaySession?.canMakePayments()
|
||||
};
|
||||
|
||||
async function isOPFSSupported() {
|
||||
|
||||
@@ -145,6 +145,7 @@ async function processNote(entry: ZipEntry, attachments: Record<string, any>) {
|
||||
(await db.tags.add({
|
||||
title: tag
|
||||
}));
|
||||
if (!tagId) continue;
|
||||
|
||||
await db.relations.add(
|
||||
{
|
||||
@@ -166,6 +167,7 @@ async function processNote(entry: ZipEntry, attachments: Record<string, any>) {
|
||||
colorCode: colorCode,
|
||||
title: note.color
|
||||
}));
|
||||
if (!colorId) return;
|
||||
|
||||
await db.relations.add(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user