diff --git a/src/kernel.ts b/src/kernel.ts index 36f936b..d5dfeb8 100644 --- a/src/kernel.ts +++ b/src/kernel.ts @@ -13,6 +13,8 @@ import { getStoredUserKey } from "./storage.js"; import { readableStreamToBlob } from "binconv"; import { addContextToErr } from "@lumeweb/libkernel"; +let kernelLoadAttempt = false; + export function boot() { let userKey; @@ -37,6 +39,12 @@ export function boot() { } export async function loadKernel() { + if (kernelLoadAttempt) { + return; + } + + kernelLoadAttempt = true; + try { maybeInitDefaultPortals(); } catch (e) {