1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-18 19:39:55 +00:00

Only set the style of the button widget if the style attribute is specified

This commit is contained in:
Jeremy Ruston 2013-11-04 09:58:56 +00:00
parent fd70aa8c45
commit 8ab7a1dd8f

View File

@ -47,7 +47,9 @@ ButtonWidget.prototype.render = function(parent,nextSibling) {
}
domNode.className = classes.join(" ");
// Assign classes
domNode.setAttribute("style",this.style);
if(this.style) {
domNode.setAttribute("style",this.style);
}
// Add a click event handler
domNode.addEventListener("click",function (event) {
var handled = false;