X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/d3bd4d6524e46d6732f758b2854afeff1c890b2a..73e8795a3d19b7221f34353799d39808d57a4d05:/src/smartxml/transformations.js diff --git a/src/smartxml/transformations.js b/src/smartxml/transformations.js index 5f0756c..a78c9c9 100644 --- a/src/smartxml/transformations.js +++ b/src/smartxml/transformations.js @@ -43,11 +43,11 @@ toret.createGenericTransformation = function(desc, name) { // potem spr na dotychczasowych undo/redo tests; this.args.forEach(function(arg, idx, args) { - if(arg.nodeType) { // ~ + if(arg && arg.nodeType) { // ~ var path = arg.getPath(); Object.defineProperty(args, idx, { get: function() { - if(transformation.hasRun) { + if(transformation.hasRun && path) { return transformation.document.getNodeByPath(path); } else { return arg;