chore: fix build
This commit is contained in:
@@ -43,8 +43,11 @@ export class Ark {
|
||||
}
|
||||
}
|
||||
|
||||
public async get_text_events(limit: number, until?: number) {
|
||||
public async get_text_events(limit: number, asOf?: number) {
|
||||
try {
|
||||
let until: string = undefined;
|
||||
if (asOf && asOf > 0) until = asOf.toString();
|
||||
|
||||
const cmd: Event[] = await invoke("get_text_events", { limit, until });
|
||||
return cmd;
|
||||
} catch (e) {
|
||||
|
||||
@@ -30,9 +30,15 @@ export class LumeStorage {
|
||||
}
|
||||
|
||||
public async loadSettings() {
|
||||
const settings: Settings = JSON.parse(await this.#store.get("settings"));
|
||||
for (const [key, value] of Object.entries(settings)) {
|
||||
this.settings[key] = value;
|
||||
const data = await this.#store.get("settings");
|
||||
if (!data) return;
|
||||
|
||||
const settings = JSON.parse(data as string) as Settings;
|
||||
|
||||
if (Object.keys(settings).length) {
|
||||
for (const [key, value] of Object.entries(settings)) {
|
||||
this.settings[key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user