mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
Fix error when no compliments are set
This commit is contained in:
parent
e2427fe299
commit
65e1b60fb7
@ -169,12 +169,12 @@ Module.register("compliments", {
|
||||
index = this.randomIndex(compliments);
|
||||
}
|
||||
else{
|
||||
// no, sequetial
|
||||
// no, sequential
|
||||
// if doing sequential, don't fall off the end
|
||||
index = (this.lastIndexUsed >= (compliments.length-1))?0: ++this.lastIndexUsed;
|
||||
}
|
||||
|
||||
return compliments[index];
|
||||
return compliments[index] || "";
|
||||
},
|
||||
|
||||
// Override dom generator.
|
||||
|
Loading…
x
Reference in New Issue
Block a user