diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index a5456c1bb..926c9556e 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -217,6 +217,10 @@ export function Root(props: IProps): React.ReactElement { ); async function updateRAM(newCode: string): Promise { + if (currentScript != null && currentScript.fileName.endsWith(".txt")) { + debouncedSetRAM(""); + return; + } setUpdatingRam(true); const codeCopy = newCode + ""; const ramUsage = await calculateRamUsage(codeCopy, props.player.getCurrentServer().scripts);