fix: JSON deserialization fails (bug #6091) (collapsed procedure call… (#6103)

* fix: JSON deserialization fails (bug #6091) (collapsed procedure call blocks)

* fix: JSON deserialization fails (bug #6091) changed fix, added tests (collapsed procedure call blocks)
This commit is contained in:
Tobias Weinert
2022-04-27 17:00:47 +02:00
committed by GitHub
parent 24704e0eff
commit 45c36f8982
2 changed files with 44 additions and 5 deletions

View File

@@ -721,10 +721,10 @@ const PROCEDURE_CALL_COMMON = {
if (!mutatorOpen) {
this.quarkConnections_ = {};
this.quarkIds_ = null;
}
if (!paramIds) {
// Reset the quarks (a mutator is about to open).
return;
} else {
// fix #6091 - this call could cause an error when outside if-else
// expanding block while mutating prevents another error (ancient fix)
this.setCollapsed(false);
}
// Test arguments (arrays of strings) for changes. '\n' is not a valid
// argument name character, so it is a valid delimiter here.
@@ -736,7 +736,6 @@ const PROCEDURE_CALL_COMMON = {
if (paramIds.length !== paramNames.length) {
throw RangeError('paramNames and paramIds must be the same length.');
}
this.setCollapsed(false);
if (!this.quarkIds_) {
// Initialize tracking for this block.
this.quarkConnections_ = {};