fixed type checking

This commit is contained in:
Edward Shen 2018-04-28 20:44:44 -04:00
parent d27abc07e5
commit 3791b1913e
No known key found for this signature in database
GPG key ID: 4E887A42793D0433

View file

@ -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!');