Add callback to hide and show

The callback is only optional, if you don't use the options.
https://docs.magicmirror.builders/development/core-module-file.html#this-hide-speed-callback-options

Without this change you can see an error message in the browser console: "callback is not an optional parameter!"
This commit is contained in:
Kristjan ESPERANTO 2024-12-10 20:10:32 +01:00
parent 347c9bd78c
commit 00800b9ac4

View file

@ -212,13 +212,13 @@ Module.register('MMM-pages', {
MM.getModules() MM.getModules()
.exceptWithClass(modulesToShow) .exceptWithClass(modulesToShow)
.enumerate(module => module.hide(animationTime, lockStringObj)); .enumerate(module => module.hide(animationTime, () => {}, lockStringObj));
// Shows all modules meant to be on the current page, after a small delay. // Shows all modules meant to be on the current page, after a small delay.
setTimeout(() => { setTimeout(() => {
MM.getModules() MM.getModules()
.withClass(modulesToShow) .withClass(modulesToShow)
.enumerate(module => module.show(animationTime, lockStringObj)); .enumerate(module => module.show(animationTime, () => {}, lockStringObj));
}, animationTime); }, animationTime);
}, },