Fix lua in RO mode

pull/1224/head
Zef Hemel 2025-01-24 17:43:28 +01:00
parent 9044c275e3
commit 5139acda3a
1 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,10 @@ const stdLibCacheKey = ["stdLibCache"];
type StdLibCache = Record<string, number>; // page name -> last modified time
export async function init() {
// Check if in read-only mode
if (await system.getMode() === "ro") {
return;
}
let stdLibCache: StdLibCache | undefined = await datastore.get(
stdLibCacheKey,
);