Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -60,7 +60,7 @@ export default class ToastStore extends EventEmitter {
* @param {object} newToast The new toast
*/
addOrReplaceToast<C extends ComponentClass>(newToast: IToast<C>) {
const oldIndex = this.toasts.findIndex(t => t.key === newToast.key);
const oldIndex = this.toasts.findIndex((t) => t.key === newToast.key);
if (oldIndex === -1) {
let newIndex = this.toasts.length;
while (newIndex > 0 && this.toasts[newIndex - 1].priority < newToast.priority) --newIndex;
@ -68,7 +68,7 @@ export default class ToastStore extends EventEmitter {
} else {
this.toasts[oldIndex] = newToast;
}
this.emit('update');
this.emit("update");
}
dismissToast(key) {
@ -77,13 +77,13 @@ export default class ToastStore extends EventEmitter {
}
const length = this.toasts.length;
this.toasts = this.toasts.filter(t => t.key !== key);
this.toasts = this.toasts.filter((t) => t.key !== key);
if (length !== this.toasts.length) {
if (this.toasts.length === 0) {
this.countSeen = 0;
}
this.emit('update');
this.emit("update");
}
}