fix: Use bus.$off to remove listeners on destroy (#3478)
This commit is contained in:
parent
86dfdfb9ab
commit
0899f62912
8 changed files with 44 additions and 24 deletions
|
@ -93,6 +93,7 @@ import { REPLY_EDITOR_MODES } from 'dashboard/components/widgets/WootWriter/cons
|
|||
import WootMessageEditor from 'dashboard/components/widgets/WootWriter/Editor';
|
||||
import { checkFileSizeLimit } from 'shared/helpers/FileHelper';
|
||||
import { MAXIMUM_FILE_UPLOAD_SIZE } from 'shared/constants/messages';
|
||||
import { BUS_EVENTS } from 'shared/constants/busEvents';
|
||||
|
||||
import {
|
||||
isEscape,
|
||||
|
@ -368,7 +369,7 @@ export default {
|
|||
this.clearMessage();
|
||||
try {
|
||||
await this.$store.dispatch('sendMessage', messagePayload);
|
||||
this.$emit('scrollToMessage');
|
||||
this.$emit(BUS_EVENTS.SCROLL_TO_MESSAGE);
|
||||
} catch (error) {
|
||||
const errorMessage =
|
||||
error?.response?.data?.error ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue