1
0
Fork 0
mirror of synced 2024-09-29 16:51:33 +13:00

some comments..

This commit is contained in:
Michael Shanks 2020-06-30 14:18:51 +01:00
parent 4df27df9af
commit 7fe96dff02
2 changed files with 5 additions and 0 deletions

View file

@ -8,6 +8,8 @@
}
onMount(async () => {
// navigate to first model in list, if not already selected
// and this is the final url (i.e. no selectedModel)
if (!$leftover && $backendUiStore.models.length > 0 && (!$backendUiStore.selectedModel || !$backendUiStore.selectedModel._id)) {
$goto(`./${$backendUiStore.models[0]._id}`)
}

View file

@ -8,7 +8,10 @@
}
onMount(async () => {
// navigate to first model in list, if not already selected
// and this is the final url (i.e. no selectedModel)
if (!$leftover && $backendUiStore.models.length > 0 && (!$backendUiStore.selectedModel || !$backendUiStore.selectedModel._id)) {
// this file routes as .../models/index, so, go up one.
$goto(`../${$backendUiStore.models[0]._id}`)
}
})