fix(import): hydrate state on import

This commit is contained in:
Lewis Wynne 2026-03-23 19:41:28 +00:00
parent 5e89d0e64f
commit ef0c982d98
2 changed files with 3 additions and 5 deletions

View file

@ -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;