diff --git a/src/core/store.ts b/src/core/store.ts index 9e52b4e9..75e3066c 100644 --- a/src/core/store.ts +++ b/src/core/store.ts @@ -68,10 +68,11 @@ export function removeToast(params?: Id | RemoveParams) { }); } else if (params && ('containerId' in params || 'id' in params)) { const container = containers.get(params.containerId); - container ? container.removeToast(params.id) : - containers.forEach(c => { - c.removeToast(params.id); - }); + container + ? container.removeToast(params.id) + : containers.forEach(c => { + c.removeToast(params.id); + }); } } diff --git a/src/core/toast.cy.tsx b/src/core/toast.cy.tsx index 863fe4e2..36b1afae 100644 --- a/src/core/toast.cy.tsx +++ b/src/core/toast.cy.tsx @@ -440,7 +440,7 @@ describe('with multi containers', () => { .should('exist') .then(() => { toast.dismiss({ - containerId: Containers.Third, + containerId: Containers.Third }); cy.resolveEntranceAnimation();