1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-22 22:13:20 +02:00

fix warning The watch property should be above the mounted

This commit is contained in:
Logorrheique 2024-11-04 13:32:40 +01:00
parent 49a5272573
commit ffa8aad019

View File

@ -11,18 +11,19 @@ export default {
components: { components: {
MonitorList, MonitorList,
}, },
mounted() {
if (!this.$root.isMobile && this.$route.path === "/list") {
this.$router.push("/dashboard");
}
},
watch: { watch: {
"$root.isMobile"(newVal) { "$root.isMobile"(newVal) {
if (!newVal && this.$route.path === "/list") { if (!newVal && this.$route.path === "/list") {
this.$router.push("/dashboard"); this.$router.push("/dashboard");
} }
} }
},
mounted() {
if (!this.$root.isMobile && this.$route.path === "/list") {
this.$router.push("/dashboard");
} }
},
}; };
</script> </script>