Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "undefined" in weather modules header. #2103

Merged
merged 6 commits into from
Sep 2, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Set visibility of header more explicitly
  • Loading branch information
rejas committed Aug 13, 2020
commit ec08cb32aa880f09d772c8cd869e7e0d2faf194f
4 changes: 3 additions & 1 deletion js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ var MM = (function () {

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

var moduleContent = document.createElement("div");
Expand Down Expand Up @@ -218,7 +220,7 @@ var MM = (function () {

headerWrapper[0].innerHTML = newHeader;
if (headerWrapper.length > 0 && newHeader) {
delete headerWrapper[0].style;
headerWrapper[0].style.display = "block";
} else {
headerWrapper[0].style.display = "none";
}
Expand Down