From a052ecee62bbda48fbaceb2434b868e0b8138c3c Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 25 Apr 2023 13:16:55 +0200 Subject: [PATCH] FIX: safeguard in case the message is active during transition (#21235) Prior to this fix, we could sometimes still have an active message while the DOM node was already removed. --- .../discourse/components/chat-message-actions-desktop.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js index 5cf220165a9..3bba9d6d83c 100644 --- a/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js +++ b/plugins/chat/assets/javascripts/discourse/components/chat-message-actions-desktop.js @@ -45,6 +45,10 @@ export default class ChatMessageActionsDesktop extends Component { this.context ); + if (!messageContainer) { + return; + } + this.popper = createPopper(messageContainer, element, { placement: "top-end", strategy: "fixed",