Skip to content

Commit

Permalink
fix: Undefined error when removeNode event and no node is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Feb 24, 2020
1 parent 5a61f03 commit c0500d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ export default {
})
this.socket.on(this.socketEvents.nodeRemoved, node => {
if (self.selectedNode.node_id === node.node_id) {
if (self.selectedNode && self.selectedNode.node_id === node.node_id) {
self.selectedNode = null
}
self.$set(self.nodes, node.node_id, node)
Expand Down

0 comments on commit c0500d2

Please sign in to comment.