is compiled? should return true even if the script couldn't be compiled

This commit is contained in:
Thomas Weber committed 2020-11-16 00:30:47 -06:00
1 parent 5f3571e9a8
commit 4bd5779835
1 file changed
+6
+6
View File
@@ -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;