diff --git a/app/src/plugin/index.ts b/app/src/plugin/index.ts index 2f26ff9aa..7c90224e3 100644 --- a/app/src/plugin/index.ts +++ b/app/src/plugin/index.ts @@ -74,6 +74,9 @@ export class Plugin { public saveData(storageName: string, data: any) { return new Promise((resolve) => { + if (!this.data) { + this.data = {}; + } const pathString = `/data/storage/petal/${this.name}/${storageName}`; const file = new File([new Blob([data])], pathString.split("/").pop()); const formData = new FormData();