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

Do not run updateDom() on hidden modules. #2166

Closed
wants to merge 7 commits into from

Conversation

MichMich
Copy link
Collaborator

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.

@MagicMirrorBot
Copy link

Warnings
⚠️

Please include an updated CHANGELOG.md file.
This way we can keep track of all the contributions.

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;
Copy link
Collaborator

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.

Copy link
Collaborator Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants