From e219b1462f3fcd0e22a8790903bdf1c7790820f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 8 Apr 2022 17:03:26 +0300 Subject: [PATCH] Update TabViewDemo.vue --- src/views/tabview/TabViewDemo.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/views/tabview/TabViewDemo.vue b/src/views/tabview/TabViewDemo.vue index 868552fb3..6649deb5b 100755 --- a/src/views/tabview/TabViewDemo.vue +++ b/src/views/tabview/TabViewDemo.vue @@ -179,10 +179,12 @@ export default { mounted() { this.themeChangeListener = () => { this.timeout = setTimeout(() => { - this.$refs.tabview1.updateInkBar(); - this.$refs.tabview2.updateInkBar(); - this.$refs.tabview3.updateInkBar(); - this.$refs.tabview4.updateInkBar(); + if (this.$refs.tabview1) { + this.$refs.tabview1.updateInkBar(); + this.$refs.tabview2.updateInkBar(); + this.$refs.tabview3.updateInkBar(); + this.$refs.tabview4.updateInkBar(); + } }, 50); }; EventBus.on('theme-change', this.themeChangeListener);