Fix lua in RO mode
parent
9044c275e3
commit
5139acda3a
|
@ -37,6 +37,10 @@ const stdLibCacheKey = ["stdLibCache"];
|
||||||
type StdLibCache = Record<string, number>; // page name -> last modified time
|
type StdLibCache = Record<string, number>; // page name -> last modified time
|
||||||
|
|
||||||
export async function init() {
|
export async function init() {
|
||||||
|
// Check if in read-only mode
|
||||||
|
if (await system.getMode() === "ro") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let stdLibCache: StdLibCache | undefined = await datastore.get(
|
let stdLibCache: StdLibCache | undefined = await datastore.get(
|
||||||
stdLibCacheKey,
|
stdLibCacheKey,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue