From 50a417c9d65e295c134117afa2e733cce19ac6bf Mon Sep 17 00:00:00 2001 From: Zyronon Date: Mon, 15 Sep 2025 15:24:56 +0800 Subject: [PATCH] Update func.ts --- src/types/func.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/func.ts b/src/types/func.ts index ce919878..fac3317f 100644 --- a/src/types/func.ts +++ b/src/types/func.ts @@ -6,6 +6,7 @@ import {nanoid} from "nanoid"; export function getDefaultWord(val: Partial = {}): Word { return { custom: false, + id : nanoid(6), "word": "", "phonetic0": "", "phonetic1": "", @@ -18,8 +19,7 @@ export function getDefaultWord(val: Partial = {}): Word { "rels": [] }, "etymology": [], - ...val, - id: val?.id ? val.id : nanoid(6), + ...val } }