Skip to content
Snippets Groups Projects
Commit 7e8c1ae4 authored by Paul Kaplan's avatar Paul Kaplan
Browse files

Check if block exists before updating

parent 882ed693
Branches
Tags
No related merge requests found
......@@ -100,13 +100,13 @@ class Blocks extends React.Component {
this.props.vm.removeListener('targetsUpdate', this.onTargetsUpdate);
}
updateToolboxBlockValue (id, value) {
this.workspace
const block = this.workspace
.getFlyout()
.getWorkspace()
.getBlockById(id)
.inputList[0]
.fieldRow[0]
.setValue(value);
.getBlockById(id);
if (block) {
block.inputList[0].fieldRow[0].setValue(value);
}
}
onTargetsUpdate () {
if (this.props.vm.editingTarget) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment