diff --git a/src/renderer/loaders/HoldNode.js b/src/renderer/loaders/HoldNode.js index b04525b..1e1af5d 100644 --- a/src/renderer/loaders/HoldNode.js +++ b/src/renderer/loaders/HoldNode.js @@ -8,10 +8,14 @@ const store = require('../store'); var $ = require('jquery'); L.HoldNode = L.Marker.extend({ select() { - this._icon.childNodes[0].style['background-color'] = 'red'; + if(this._icon!==null) { + this._icon.childNodes[0].style['background-color'] = 'red'; + } }, deselect() { - this._icon.childNodes[0].style['background-color'] = '#4838cc'; + if(this._icon!==null) { + this._icon.childNodes[0].style['background-color'] = '#4838cc'; + } }, addListeners: function () { this.on('editable:drawing:move', function (event) {