mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-12-22 08:45:09 -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) {
|
||||
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!');
|
||||
|
|
Loading…
Reference in a new issue