diff options
Diffstat (limited to 'src/client/components/stream-indicator.vue')
| -rw-r--r-- | src/client/components/stream-indicator.vue | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/client/components/stream-indicator.vue b/src/client/components/stream-indicator.vue index 9005cb9a8b..7b020171a4 100644 --- a/src/client/components/stream-indicator.vue +++ b/src/client/components/stream-indicator.vue @@ -9,9 +9,10 @@ </template> <script lang="ts"> -import Vue from 'vue'; +import { defineComponent } from 'vue'; +import * as os from '@/os'; -export default Vue.extend({ +export default defineComponent({ data() { return { hasDisconnected: false, @@ -19,14 +20,14 @@ export default Vue.extend({ }, computed: { stream() { - return this.$root.stream; + return os.stream; }, }, created() { - this.$root.stream.on('_disconnected_', this.onDisconnected); + os.stream.on('_disconnected_', this.onDisconnected); }, - beforeDestroy() { - this.$root.stream.off('_disconnected_', this.onDisconnected); + beforeUnmount() { + os.stream.off('_disconnected_', this.onDisconnected); }, methods: { onDisconnected() { |