Skip to content

Commit

Permalink
Merge pull request #2083 from sthuber90/backward-browser-compatability
Browse files Browse the repository at this point in the history
Backward browser compatability
  • Loading branch information
MichMich authored Jul 17, 2020
2 parents 275825c + 17549fe commit a00a1c6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ _This release is scheduled to be released on 2020-10-01._

### Fixed

- Fix backward compatibility issues for Safari < 11. [#1985](https://github.com/MichMich/MagicMirror/issues/1985)
- Fix the use of "maxNumberOfDays" in the module "weatherforecast depending on the endpoint (forecast/daily or forecast)". [#2018](https://github.com/MichMich/MagicMirror/issues/2018)
- Fix calendar display. Account for current timezone. [#2068](https://github.com/MichMich/MagicMirror/issues/2068)
- Fix logLevel being set before loading config.
Expand Down
2 changes: 1 addition & 1 deletion js/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
root.Log = factory(root.config);
}
})(this, function (config) {
let logLevel = {
const logLevel = {
info: Function.prototype.bind.call(console.info, console),
log: Function.prototype.bind.call(console.log, console),
error: Function.prototype.bind.call(console.error, console),
Expand Down
8 changes: 6 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var MM = (function () {
dom.appendChild(moduleHeader);

if (typeof module.getHeader() === "undefined" || module.getHeader() !== "") {
moduleHeader.style = "display: none;";
moduleHeader.style.display = "none;";
}

var moduleContent = document.createElement("div");
Expand Down Expand Up @@ -216,7 +216,11 @@ var MM = (function () {
contentWrapper[0].appendChild(newContent);

headerWrapper[0].innerHTML = newHeader;
headerWrapper[0].style = headerWrapper.length > 0 && newHeader ? undefined : "display: none;";
if (headerWrapper.length > 0 && newHeader) {
delete headerWrapper[0].style;
} else {
headerWrapper[0].style.display = "none";
}
};

/* hideModule(module, speed, callback)
Expand Down

0 comments on commit a00a1c6

Please sign in to comment.