Skip to content

Commit 284db39

Browse files
committed
type fix
1 parent dc25b2f commit 284db39

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

db/dexieDb.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ class DexieDb extends Dexie implements HabitDatabaseInterface {
293293
const all = await this.tags.toArray();
294294
const nextOrder = all.length > 0 ? Math.max(0, ...all.map((t) => (t as Tag).order ?? 0)) + 1 : 0;
295295
const now = new Date().toISOString();
296-
const toAdd: Tag = { name: trimmed, order: nextOrder, created_at: now, updated_at: now };
297-
const id = await this.tags.add(toAdd as any);
296+
const toAdd: Omit<Tag, 'id'> = { name: trimmed, order: nextOrder, created_at: now, updated_at: now };
297+
const id = await this.tags.add(toAdd as Tag);
298298
return { ...toAdd, id };
299299
}
300300

0 commit comments

Comments
 (0)