fix: save portals after booting, but before executing the kernel

This commit is contained in:
Derrick Hammer 2023-09-11 05:56:40 -04:00
parent 1329712573
commit 1f3cb20bd4
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,7 @@
import { import {
downloadSmallObject, downloadSmallObject,
maybeInitDefaultPortals, maybeInitDefaultPortals,
savePortals,
setActivePortalMasterKey, setActivePortalMasterKey,
} from "@lumeweb/libweb"; } from "@lumeweb/libweb";
import { log, logErr, sendAuthUpdate } from "./util.js"; import { log, logErr, sendAuthUpdate } from "./util.js";
@ -65,6 +66,8 @@ export async function loadKernel() {
return; return;
} }
savePortals();
try { try {
await new Promise(async (resolve, reject) => { await new Promise(async (resolve, reject) => {
const url = URL.createObjectURL(await readableStreamToBlob(kernelCode)); const url = URL.createObjectURL(await readableStreamToBlob(kernelCode));