diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dad485a..b85367df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Fix null dereference in moduleNeedsUpdate when the module isn't visible - Calendar: Fixed event end times by setting default calendarEndTime to "LT" (Local time format). [#1479] - Calendar: Fixed missing calendar fetchers after server process restarts [#1589](https://github.com/MichMich/MagicMirror/issues/1589) +- Use getHeader instead of data.header when creating the DOM so overwriting the function also propagates into it ### New weather module - Fixed weather forecast table display [#1499](https://github.com/MichMich/MagicMirror/issues/1499). diff --git a/js/main.js b/js/main.js index 21a882f8..2330d3ee 100644 --- a/js/main.js +++ b/js/main.js @@ -39,9 +39,9 @@ var MM = (function() { dom.opacity = 0; wrapper.appendChild(dom); - if (typeof module.data.header !== "undefined" && module.data.header !== "") { + if (typeof module.getHeader() !== "undefined" && module.getHeader() !== "") { var moduleHeader = document.createElement("header"); - moduleHeader.innerHTML = module.data.header; + moduleHeader.innerHTML = module.getHeader(); moduleHeader.className = "module-header"; dom.appendChild(moduleHeader); } diff --git a/js/module.js b/js/module.js index 907a7f61..3e39dd5c 100644 --- a/js/module.js +++ b/js/module.js @@ -212,7 +212,7 @@ var Module = Class.extend({ /* setData(data) * Set the module data. * - * argument data obejct - Module data. + * argument data object - Module data. */ setData: function (data) { this.data = data; @@ -226,7 +226,7 @@ var Module = Class.extend({ /* setConfig(config) * Set the module config and combine it with the module defaults. * - * argument config obejct - Module config. + * argument config object - Module config. */ setConfig: function (config) { this.config = Object.assign({}, this.defaults, config); diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index a1e4aa8d..0076a605 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -273,7 +273,7 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri /* isFullDayEvent(event) * Checks if an event is a fullday event. * - * argument event obejct - The event object to check. + * argument event object - The event object to check. * * return bool - The event is a fullday event. */