mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-13 02:34:20 +01:00
🚨
This commit is contained in:
parent
c3d8f1efc9
commit
eb30109d7f
1 changed files with 3 additions and 3 deletions
|
|
@ -258,17 +258,17 @@ export class Plugin {
|
|||
this.setting.open(this.displayName || this.name);
|
||||
}
|
||||
|
||||
public loadData(storageName: string): Promise<IWebSocketData> {
|
||||
public loadData(storageName: string): Promise<any> {
|
||||
if (typeof this.data[storageName] === "undefined") {
|
||||
this.data[storageName] = "";
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
return new Promise((resolve) => {
|
||||
fetchPost("/api/file/getFile", {
|
||||
path: `/data/storage/petal/${this.name}/${storageName.replace(/[\/\\]+/g, "")}`
|
||||
}, (response) => {
|
||||
this.data[storageName] = response;
|
||||
resolve(this.data[storageName]);
|
||||
}, null, (response) => {
|
||||
}, null, () => {
|
||||
resolve("");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue