X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/eb45e596e503a841c210b9773de0ccdbb0d3c2eb..e9aaf1e41c5e695136d06f008c06b287da7d3eda:/src/editor/modules/documentCanvas/canvas/canvas.js 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); }