From 04e3c573972ce2703719900f003192b09696bd38 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sun, 21 Nov 2021 11:19:08 +0100 Subject: [PATCH] [clean] Replace unneeded computed with initialized ref --- src/layouts/MainLayout.vue | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index 1bf641b..889a6a5 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -105,19 +105,7 @@ export default defineComponent({ const router = useRouter(); const mainStore = useMainStore(); const flaschengeist = inject('flaschengeist'); - const _leftDrawer = ref(); - const leftDrawer = computed({ - get: () => { - if (_leftDrawer.value !== undefined) { - return _leftDrawer.value - } - if (Platform.is.mobile) { - return false - } - return true - }, - set: (val) => _leftDrawer.value = val - }) + const leftDrawer = ref(!Platform.is.mobile); const leftDrawerMini = ref(false); const mainLinks = flaschengeist?.menuLinks || []; const notifications = computed(() => mainStore.notifications.slice().reverse());