Update func.ts
This commit is contained in:
@@ -6,6 +6,7 @@ import {nanoid} from "nanoid";
|
||||
export function getDefaultWord(val: Partial<Word> = {}): Word {
|
||||
return {
|
||||
custom: false,
|
||||
id : nanoid(6),
|
||||
"word": "",
|
||||
"phonetic0": "",
|
||||
"phonetic1": "",
|
||||
@@ -18,8 +19,7 @@ export function getDefaultWord(val: Partial<Word> = {}): Word {
|
||||
"rels": []
|
||||
},
|
||||
"etymology": [],
|
||||
...val,
|
||||
id: val?.id ? val.id : nanoid(6),
|
||||
...val
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user