X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/817629a2384a90a41d668db3c1f5c7a15baeaa5c..4ae1d665fcd3af9fb06d664418f02f365933d9ae:/modules/visualEditor.js?ds=sidebyside diff --git a/modules/visualEditor.js b/modules/visualEditor.js index dfa8335..a607d86 100644 --- a/modules/visualEditor.js +++ b/modules/visualEditor.js @@ -283,10 +283,10 @@ rng.modules.visualEditor = function(sandbox) { var pane = this.node.find('#rng-visualEditor-edit'); pane.html( $(sandbox.getTemplate('editPane')({tag: node.attr('wlxml-tag'), klass: node.attr('wlxml-class')}))); - var parent = { + var parent = node.parent('[wlxml-tag]').length ? { repr: node.parent().attr('wlxml-tag') + ' / ' + (node.parent().attr('wlxml-class') || '[[no class]]'), id: node.parent().attr('id') - } + } : undefined; var children = []; node.children('[wlxml-tag]').each(function() { var child = $(this);