fix set editing target function

This commit is contained in:
DD 2018-01-11 16:43:18 -05:00
parent bc64e6ed3e
commit 7ed58da1cf

View file

@ -631,7 +631,7 @@ class VirtualMachine extends EventEmitter {
*/ */
setEditingTarget (targetId) { setEditingTarget (targetId) {
// Has the target id changed? If not, exit. // Has the target id changed? If not, exit.
if (targetId === this.editingTarget.id) { if (this.editingTarget && targetId === this.editingTarget.id) {
return; return;
} }
const target = this.runtime.getTargetById(targetId); const target = this.runtime.getTargetById(targetId);