Suppress warning on changePageBy if fallback is valid.

This commit is contained in:
Edward Shen 2020-11-06 10:27:17 -05:00
parent 6e025371bd
commit c39f60409d
Signed by: edward
GPG key ID: F350507060ED6C90

View file

@ -149,7 +149,7 @@ Module.register('MMM-pages', {
* numbers.
*/
changePageBy: function (amt, fallback) {
if (typeof amt !== 'number') {
if (typeof amt !== 'number' && typeof fallback === 'undefined') {
Log.warn(`[Pages]: ${amt} is not a number!`);
}