mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 23:12:24 -05:00
fix value
This commit is contained in:
parent
4b1307bb11
commit
01db5da8ce
2 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ class Blocks {
|
||||||
if (!block.fields[args.name]) return;
|
if (!block.fields[args.name]) return;
|
||||||
if (args.name === 'VARIABLE') {
|
if (args.name === 'VARIABLE') {
|
||||||
// Get variable name using the id in args.value.
|
// Get variable name using the id in args.value.
|
||||||
const variable = optRuntime.getEditingTarget().lookupVariableById(args.id);
|
const variable = optRuntime.getEditingTarget().lookupVariableById(args.value);
|
||||||
if (variable) {
|
if (variable) {
|
||||||
block.fields[args.name].value = variable.name;
|
block.fields[args.name].value = variable.name;
|
||||||
block.fields[args.name].id = args.value;
|
block.fields[args.name].id = args.value;
|
||||||
|
|
|
@ -169,7 +169,7 @@ class Target extends EventEmitter {
|
||||||
id: id,
|
id: id,
|
||||||
element: 'field',
|
element: 'field',
|
||||||
name: 'VARIABLE',
|
name: 'VARIABLE',
|
||||||
value: newName
|
value: id
|
||||||
}, this.runtime);
|
}, this.runtime);
|
||||||
this.runtime.requestUpdateMonitor(Map({
|
this.runtime.requestUpdateMonitor(Map({
|
||||||
id: id,
|
id: id,
|
||||||
|
|
Loading…
Reference in a new issue