From 5139acda3a11f99ad8c48f740fcaaf01adfe8c0c Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Fri, 24 Jan 2025 17:43:28 +0100 Subject: [PATCH] Fix lua in RO mode --- plugs/core/std.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugs/core/std.ts b/plugs/core/std.ts index 22235495..095c0c29 100644 --- a/plugs/core/std.ts +++ b/plugs/core/std.ts @@ -37,6 +37,10 @@ const stdLibCacheKey = ["stdLibCache"]; type StdLibCache = Record; // 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, );