fix: throwing errors

This commit is contained in:
DarkPhoenix2704
2025-01-10 16:11:01 +00:00
parent 34d7858963
commit f7d93e6248
4 changed files with 23 additions and 11 deletions

View File

@@ -26,7 +26,12 @@ const viewsRef = shallowRef<ViewType[]>([])
watch(
() => [props.tableId, props.ignoreLoading, props.forceFetchViews],
async () => {
await viewsStore.loadViews({ tableId: props.tableId, ignoreLoading: props.ignoreLoading, force: props.forceFetchViews })
try {
await viewsStore.loadViews({ tableId: props.tableId, ignoreLoading: props.ignoreLoading, force: props.forceFetchViews })
} catch (e) {
console.error(e)
}
let viewsList: ViewType[] = viewsByTable.value.get(props.tableId) || []
if (props.labelDefaultViewAsDefault) {
viewsList = viewsList.map((v) => ({ ...v, title: v.is_default ? 'Default View' : v.title }))