From f45d2bd37bc7a91f813fa356287696b643af7801 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Tue, 9 May 2023 19:28:16 +0800 Subject: [PATCH] :rotating_light: --- app/src/plugin/index.ts | 3 +++ 1 file changed, 3 insertions(+) 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();