Merge pull request from mzgoddard/set-procedure-param-missing

Set procedure param missing
This commit is contained in:
Karishma Chadha 2018-10-25 00:13:51 -04:00 committed by GitHub
commit d3e38c1ae9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 7 additions and 2 deletions

View file

@ -54,7 +54,9 @@ class Scratch3ProcedureBlocks {
argumentReporterStringNumber (args, util) {
const value = util.getParam(args.VALUE);
if (value === null) {
return '';
// When the parameter is not found in the most recent procedure
// call, the default is always 0.
return 0;
}
return value;
}
@ -62,7 +64,9 @@ class Scratch3ProcedureBlocks {
argumentReporterBoolean (args, util) {
const value = util.getParam(args.VALUE);
if (value === null) {
return false;
// When the parameter is not found in the most recent procedure
// call, the default is always 0.
return 0;
}
return value;
}

View file

@ -349,6 +349,7 @@ class Thread {
if (frame.params.hasOwnProperty(paramName)) {
return frame.params[paramName];
}
return null;
}
return null;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.