X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/eb45e596e503a841c210b9773de0ccdbb0d3c2eb..5f121e33df901aa33a79b2896e79759da6411948:/src/editor/modules/documentCanvas/canvas/canvas.js?ds=inline diff --git a/src/editor/modules/documentCanvas/canvas/canvas.js b/src/editor/modules/documentCanvas/canvas/canvas.js index 5cfc015..b217d18 100644 --- a/src/editor/modules/documentCanvas/canvas/canvas.js +++ b/src/editor/modules/documentCanvas/canvas/canvas.js @@ -245,6 +245,11 @@ $.extend(Canvas.prototype, { }, setCurrentElement: function(element, params) { + if(!element) { + logger.debug('Invalid element passed to setCurrentElement: ' + element); + return; + } + if(!(element instanceof documentElement.DocumentElement)) { element = utils.findCanvasElement(element); }