Disable RAM calculation for txt files

This commit is contained in:
65-7a 2021-12-21 10:21:22 +11:00
parent 009bae5870
commit 56e540802b

@ -217,6 +217,10 @@ export function Root(props: IProps): React.ReactElement {
);
async function updateRAM(newCode: string): Promise<void> {
if (currentScript != null && currentScript.fileName.endsWith(".txt")) {
debouncedSetRAM("");
return;
}
setUpdatingRam(true);
const codeCopy = newCode + "";
const ramUsage = await calculateRamUsage(codeCopy, props.player.getCurrentServer().scripts);