Add debug lined to figure out e2e test failure
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
c492ae97fd
commit
254ed4b1b6
1 changed files with 2 additions and 0 deletions
|
@ -56,6 +56,7 @@ export default class ToastStore extends EventEmitter {
|
||||||
* @param {object} newToast The new toast
|
* @param {object} newToast The new toast
|
||||||
*/
|
*/
|
||||||
addOrReplaceToast<C extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>>(newToast: IToast<C>) {
|
addOrReplaceToast<C extends keyof JSX.IntrinsicElements | JSXElementConstructor<any>>(newToast: IToast<C>) {
|
||||||
|
console.log("DEBUG addOrReplaceToast", newToast.key, JSON.stringify(newToast));
|
||||||
const oldIndex = this.toasts.findIndex(t => t.key === newToast.key);
|
const oldIndex = this.toasts.findIndex(t => t.key === newToast.key);
|
||||||
if (oldIndex === -1) {
|
if (oldIndex === -1) {
|
||||||
let newIndex = this.toasts.length;
|
let newIndex = this.toasts.length;
|
||||||
|
@ -68,6 +69,7 @@ export default class ToastStore extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
dismissToast(key) {
|
dismissToast(key) {
|
||||||
|
console.log("DEBUG dismissToast", key);
|
||||||
const length = this.toasts.length;
|
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 (length !== this.toasts.length) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue