From 00800b9ac438695db2955cb715021f3b31f26865 Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Tue, 10 Dec 2024 20:10:32 +0100 Subject: [PATCH] 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!" --- MMM-pages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MMM-pages.js b/MMM-pages.js index 06d9649..6b9b51e 100644 --- a/MMM-pages.js +++ b/MMM-pages.js @@ -212,13 +212,13 @@ Module.register('MMM-pages', { MM.getModules() .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. setTimeout(() => { MM.getModules() .withClass(modulesToShow) - .enumerate(module => module.show(animationTime, lockStringObj)); + .enumerate(module => module.show(animationTime, () => {}, lockStringObj)); }, animationTime); },