From 25fa6978470c296bd40321d5aa3046d34062ecd8 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 7 Jun 2012 15:59:51 -0700 Subject: Fixing empty property bug with montage class on HTML tag --- js/document/mediators/template.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js index 560f8c45..e04c16d9 100755 --- a/js/document/mediators/template.js +++ b/js/document/mediators/template.js @@ -155,7 +155,9 @@ exports.TemplateDocumentMediator = Montage.create(Component, { wipeAttributes(htmlTagDoc); for (var m in htmlTagMem.attributes) { if (htmlTagMem.attributes[m].value) { - htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/montage-app-bootstrapping/gi, '')); + if (htmlTagMem.attributes[m].value.replace(/montage-app-bootstrapping/gi, '').length>0) { + htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/ montage-app-bootstrapping/gi, '')); + } } } //Getting list of current nodes (Ninja DOM) -- cgit v1.2.3