From ffa8aad01922ceb95c557267b76b2750bda82d50 Mon Sep 17 00:00:00 2001 From: Logorrheique Date: Mon, 4 Nov 2024 13:32:40 +0100 Subject: [PATCH] fix warning The watch property should be above the mounted --- src/pages/List.vue | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/pages/List.vue b/src/pages/List.vue index 7644cb21b..6f1030eef 100644 --- a/src/pages/List.vue +++ b/src/pages/List.vue @@ -11,18 +11,19 @@ export default { components: { MonitorList, }, - mounted() { - if (!this.$root.isMobile && this.$route.path === "/list") { - this.$router.push("/dashboard"); - } - }, watch: { "$root.isMobile"(newVal) { if (!newVal && this.$route.path === "/list") { this.$router.push("/dashboard"); } } - } + }, + mounted() { + if (!this.$root.isMobile && this.$route.path === "/list") { + this.$router.push("/dashboard"); + } + }, + };