fix(import): hydrate state on import
This commit is contained in:
parent
5e89d0e64f
commit
ef0c982d98
2 changed files with 3 additions and 5 deletions
|
|
@ -33,11 +33,11 @@ export const roster = {
|
|||
}
|
||||
},
|
||||
|
||||
async create(template: Template) {
|
||||
async create(template: Template, data: Record<string, unknown> = {}) {
|
||||
const char: Character = {
|
||||
id: crypto.randomUUID(),
|
||||
template: $state.snapshot(template),
|
||||
data: {}
|
||||
data: { ...data }
|
||||
};
|
||||
characters.push(char);
|
||||
activeId = char.id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue