fix: remove obsolete watchEffect #1795

Merged
konrad merged 1 commits from dpschen/frontend:feature/fix-remove-obsolete-watchEffect into main 2022-04-18 17:32:22 +00:00
1 changed files with 3 additions and 10 deletions

View File

@ -47,7 +47,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {ref, computed, watch, watchEffect} from 'vue' import {ref, computed, watch} from 'vue'
import {useRoute} from 'vue-router' import {useRoute} from 'vue-router'
import Message from '@/components/misc/message.vue' import Message from '@/components/misc/message.vue'
@ -95,17 +95,10 @@ const currentList = computed(() => {
// of it, most likely due to the rights not being properly populated. // of it, most likely due to the rights not being properly populated.
watch( watch(
() => props.listId, () => props.listId,
(listId) => { listId => loadList(listId),
loadList(listId) {immediate: true},
},
{
immediate: true,
},
) )
// call the method again if the listId changes
watchEffect(() => loadList(props.listId))
useTitle(() => currentList.value.id ? getListTitle(currentList.value) : '') useTitle(() => currentList.value.id ? getListTitle(currentList.value) : '')
async function loadList(listIdToLoad: number) { async function loadList(listIdToLoad: number) {