disconnect2
This commit is contained in:
parent
3739cb7306
commit
b299618191
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ export default defineComponent({
|
||||||
readObserver.observe(elRef.value);
|
readObserver.observe(elRef.value);
|
||||||
|
|
||||||
const connection = os.stream.useChannel('main');
|
const connection = os.stream.useChannel('main');
|
||||||
connection.on('readAllNotifications', () => readObserver.unobserve(elRef.value));
|
connection.on('readAllNotifications', () => readObserver.disconnect());
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
if (readObserver) readObserver.disconnect();
|
if (readObserver) readObserver.disconnect();
|
||||||
|
|
Loading…
Reference in a new issue