Fix crash when toggling chat button plugins without restart

This commit is contained in:
Vendicated 2024-02-06 18:12:09 +01:00
parent de570a4800
commit 377def4a33
No known key found for this signature in database
GPG key ID: D66986BAF75ECF18
7 changed files with 13 additions and 16 deletions

View file

@ -73,9 +73,7 @@ const getAttachments = async (channelId: string) =>
);
const PreviewButton: ChatBarButton = (props, isMainChat) => {
const { isEmpty, type: { attachments } } = props;
const PreviewButton: ChatBarButton = ({ isMainChat, isEmpty, type: { attachments } }) => {
const channelId = SelectedChannelStore.getChannelId();
const draft = useStateFromStores([DraftStore], () => getDraft(channelId));