fix: reset BOOT_FUNCTIONS on every init

This commit is contained in:
Derrick Hammer 2023-08-04 11:28:40 -04:00
parent d6133c5670
commit 7adc0c4072
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -27,7 +27,7 @@ import type { KernelAuthStatus } from "@lumeweb/libweb";
let engine: WebEngine; let engine: WebEngine;
const BOOT_FUNCTIONS: (() => Promise<any>)[] = []; let BOOT_FUNCTIONS: (() => Promise<any>)[] = [];
export async function boot() { export async function boot() {
tldEnum.list.push("localhost"); tldEnum.list.push("localhost");
@ -53,6 +53,8 @@ export async function boot() {
} }
export async function doInit() { export async function doInit() {
BOOT_FUNCTIONS = [];
engine.registerContentProvider(new IpfsProvider(engine)); engine.registerContentProvider(new IpfsProvider(engine));
engine.registerContentProvider(new ServerProvider(engine)); engine.registerContentProvider(new ServerProvider(engine));