only call showMessage if it was defined

This commit is contained in:
Tankred Hase 2013-12-05 12:33:03 +01:00
parent af29686442
commit fecad8b8c0

View File

@ -267,8 +267,11 @@ var Util = function() {
} }
html = "<p style=\"font-size: 80%; background-color: #"+color+"; margin:0; width: 652px; word-break: break-word; padding: 5px; border-bottom: 1px solid black;\"><span style=\"color: #888;\"><b>"+heading+":</b></span>"+str+"</p>"; html = "<p style=\"font-size: 80%; background-color: #"+color+"; margin:0; width: 652px; word-break: break-word; padding: 5px; border-bottom: 1px solid black;\"><span style=\"color: #888;\"><b>"+heading+":</b></span>"+str+"</p>";
} }
if (showMessages) {
// only call function if defined
showMessages(html); showMessages(html);
} }
}
this.getLeftNBits = function (string, bitcount) { this.getLeftNBits = function (string, bitcount) {
var rest = bitcount % 8; var rest = bitcount % 8;