From 7adc0c4072b102c77d392cd69e9bfe13780ca3df Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 4 Aug 2023 11:28:40 -0400 Subject: [PATCH] fix: reset BOOT_FUNCTIONS on every init --- src/main/background/boot.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/background/boot.ts b/src/main/background/boot.ts index e51963b..c7e4e41 100644 --- a/src/main/background/boot.ts +++ b/src/main/background/boot.ts @@ -27,7 +27,7 @@ import type { KernelAuthStatus } from "@lumeweb/libweb"; let engine: WebEngine; -const BOOT_FUNCTIONS: (() => Promise)[] = []; +let BOOT_FUNCTIONS: (() => Promise)[] = []; export async function boot() { tldEnum.list.push("localhost"); @@ -53,6 +53,8 @@ export async function boot() { } export async function doInit() { + BOOT_FUNCTIONS = []; + engine.registerContentProvider(new IpfsProvider(engine)); engine.registerContentProvider(new ServerProvider(engine));