From 4bd5779835d8f2a7ea74af2ba21d4db2fe87ee07 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Mon, 16 Nov 2020 00:30:47 -0600 Subject: [PATCH] is compiled? should return true even if the script couldn't be compiled --- src/blocks/scratch3_procedures.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/blocks/scratch3_procedures.js b/src/blocks/scratch3_procedures.js index 396e48f1..1f0cdf03 100644 --- a/src/blocks/scratch3_procedures.js +++ b/src/blocks/scratch3_procedures.js @@ -72,6 +72,12 @@ class Scratch3ProcedureBlocks { argumentReporterBoolean (args, util) { const value = util.getParam(args.VALUE); if (value === null) { + // tw: is compiled? and is turbowarp? should return true + // Yes, is compiled? is returning a technically incorrect value. + // This results in the least astonishment for users when they click on "is compiled?" on its own. + if (`${args.VALUE}`.toLowerCase() === 'is compiled?' || `${args.VALUE}`.toLowerCase() === 'is turbowarp?') { + return true; + } // When the parameter is not found in the most recent procedure // call, the default is always 0. return 0;