Skip to content

Commit

Permalink
No duplication during closed animation
Browse files Browse the repository at this point in the history
  • Loading branch information
satoren committed Apr 12, 2023
1 parent 122f470 commit b16e09c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SnackbarProvider/SnackbarProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class SnackbarProvider extends Component<SnackbarProviderProps, State> {
hasSpecifiedKey ? item.id === id : item.message === message;

const inQueue = state.queue.findIndex(compareFunction) > -1;
const inView = state.snacks.findIndex(compareFunction) > -1;
const inView = state.snacks.filter((item) => item.open).findIndex(compareFunction) > -1;
if (inQueue || inView) {
return state;
}
Expand Down

0 comments on commit b16e09c

Please sign in to comment.