is compiled? shouldn't return true if compiler is explicitly disabled
This commit is contained in:
1 file changed
+5
-2
@@ -75,8 +75,11 @@ class Scratch3ProcedureBlocks {
|
||||
// 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;
|
||||
if (util.target.runtime.compilerOptions.enabled) {
|
||||
const lowercaseValue = `${args.VALUE}`.toLowerCase();
|
||||
if (lowercaseValue === 'is compiled?' || lowercaseValue === 'is turbowarp?') {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// When the parameter is not found in the most recent procedure
|
||||
// call, the default is always 0.
|
||||
|
||||
Reference in new issue
Block a user