From 3791b1913e8d85bb1de9b56202bfce38fd16e2f9 Mon Sep 17 00:00:00 2001 From: Edward Shen <6173958+edward-shen@users.noreply.github.com> Date: Sat, 28 Apr 2018 20:44:44 -0400 Subject: [PATCH] fixed type checking --- MMM-pages.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MMM-pages.js b/MMM-pages.js index e8cb6bb..ff42989 100644 --- a/MMM-pages.js +++ b/MMM-pages.js @@ -42,8 +42,8 @@ Module.register('MMM-pages', { switch (notification) { case 'PAGE_CHANGED': Log.log(`${this.name} recieved a notification` - + `to change to page ${payload}`); - if (typeof curPage === 'number') { + + `to change to page ${payload} of type ${typeof payload }`); + if (typeof payload === 'number') { this.curPage = payload; } else { Log.error('Was asked to change to a nonnumber!');