tweak mascot code
This commit is contained in:
parent
ea6e480239
commit
44724e38f2
|
@ -12,8 +12,7 @@ export default class Mascot {
|
|||
current = this.storage.get() || this.list[0];
|
||||
|
||||
switch = () => {
|
||||
const newIndex = this.list.indexOf(this.current) + 1;
|
||||
this.current = this.list[newIndex % this.list.length];
|
||||
this.current = this.list[(this.list.indexOf(this.current) + 1) % this.list.length];
|
||||
this.storage.set(this.current);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue