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
Do not run updateDom() on hidden modules. #2166
Conversation
Generated by 🚫 dangerJS |
js/main.js
Outdated
@@ -110,6 +110,10 @@ var MM = (function () { | |||
* @returns {Promise} Resolved when the dom is fully updated. | |||
*/ | |||
var updateDom = function (module, speed) { | |||
if (module.hidden) { | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function should return a Promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you suggest an empty promise?
…estriction fix currentweather and weatherforecast show()ing all the time
Some modules update their dom even when they are hidden. This PR prevents modules from running updateDom whenever the module is hidden. This should fix #2161 #2164.