diff --git a/MMM-DWD-WarnWeather.js b/MMM-DWD-WarnWeather.js index cedab1d..6d123cd 100644 --- a/MMM-DWD-WarnWeather.js +++ b/MMM-DWD-WarnWeather.js @@ -97,9 +97,6 @@ Module.register("MMM-DWD-WarnWeather", { if (this.config.displayInnerHeader) { wrapper.appendChild(header); } - if (this.warnings.length < 1 && this.config.hideNoWarning) { - this.data.header = ''; - } var locNotFound = document.createElement("div"); locNotFound.className = 'locationNotFound'; @@ -185,6 +182,15 @@ Module.register("MMM-DWD-WarnWeather", { //Log.info(wrapper); return wrapper; }, + + getHeader: function () { + if (this.warnings.length < 1 && this.config.hideNoWarning) { + if (this.data.header) return ""; + else return ""; + } else { + return this.data.header; + } + }, wordwrap: function (str, width, brk) {