fix value

This commit is contained in:
DD Liu 2017-07-11 13:08:18 -04:00
parent 4b1307bb11
commit 01db5da8ce
2 changed files with 2 additions and 2 deletions

View file

@ -298,7 +298,7 @@ class Blocks {
if (!block.fields[args.name]) return;
if (args.name === 'VARIABLE') {
// 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) {
block.fields[args.name].value = variable.name;
block.fields[args.name].id = args.value;

View file

@ -169,7 +169,7 @@ class Target extends EventEmitter {
id: id,
element: 'field',
name: 'VARIABLE',
value: newName
value: id
}, this.runtime);
this.runtime.requestUpdateMonitor(Map({
id: id,