From ab6c87178faf8a1c3a783a241dfbdd987bae604c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=81ukasz?= Date: Wed, 18 Dec 2013 12:37:51 +0100 Subject: [PATCH 1/1] smartxml: throw exception on missing tagName property sent to createDocumentNode --- src/smartxml/smartxml.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/smartxml/smartxml.js b/src/smartxml/smartxml.js index f92bf01..d42dcbf 100644 --- a/src/smartxml/smartxml.js +++ b/src/smartxml/smartxml.js @@ -276,6 +276,9 @@ $.extend(Document.prototype, Backbone.Events, { /* globals document */ from = document.createTextNode(from.text); } else { + if(!from.tagName) { + throw new Error('tagName missing'); + } var node = $('<' + from.tagName + '>'); _.keys(from.attrs || {}).forEach(function(key) { -- 2.20.1