Merge pull request #14884 from JoVictorNunes/issue-14754

fix: check whether there's a toast before dismissing
This commit is contained in:
Ramón Souza 2022-04-25 21:30:26 +01:00 committed by GitHub
commit 868355cf40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,7 +62,9 @@ class StatusNotifier extends Component {
switch (status) {
case 'raiseHand':
if (emojiUsers.length === 0) return toast.dismiss(this.statusNotifierId);
if (emojiUsers.length === 0) {
return this.statusNotifierId ? toast.dismiss(this.statusNotifierId) : null;
}
if (raiseHandAudioAlert && emojiUsers.length > prevProps.emojiUsers.length) {
this.audio.play();