mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-22 10:14:30 -08:00
fixed type checking
This commit is contained in:
parent
d27abc07e5
commit
3791b1913e
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ Module.register('MMM-pages', {
|
||||||
switch (notification) {
|
switch (notification) {
|
||||||
case 'PAGE_CHANGED':
|
case 'PAGE_CHANGED':
|
||||||
Log.log(`${this.name} recieved a notification`
|
Log.log(`${this.name} recieved a notification`
|
||||||
+ `to change to page ${payload}`);
|
+ `to change to page ${payload} of type ${typeof payload }`);
|
||||||
if (typeof curPage === 'number') {
|
if (typeof payload === 'number') {
|
||||||
this.curPage = payload;
|
this.curPage = payload;
|
||||||
} else {
|
} else {
|
||||||
Log.error('Was asked to change to a nonnumber!');
|
Log.error('Was asked to change to a nonnumber!');
|
||||||
|
|
Loading…
Reference in a new issue