diff --git a/plugins/text-editor-resources/src/components/extension/table/actions/OriginalTableDataViewer.svelte b/plugins/text-editor-resources/src/components/extension/table/actions/OriginalTableDataViewer.svelte index 226b36177e6..ceb5408d2a6 100644 --- a/plugins/text-editor-resources/src/components/extension/table/actions/OriginalTableDataViewer.svelte +++ b/plugins/text-editor-resources/src/components/extension/table/actions/OriginalTableDataViewer.svelte @@ -38,15 +38,13 @@ let tableQuery: DocumentQuery $: tableQuery = documentIds.length > 0 ? { _id: { $in: documentIds as any[] } } : (query ?? {}) - // Use config from viewlet if available, otherwise use metadata config - // RelationshipTable doesn't use viewlets, so config comes directly from metadata - // Ensure config is never empty - use default empty string key for default presenter + // Use metadata config, otherwise use viewlet config $: viewletConfig = viewlet?.config $: tableConfig = - viewletConfig !== undefined && viewletConfig.length > 0 - ? viewletConfig - : config !== undefined && config.length > 0 - ? config + config !== undefined && config.length > 0 + ? config + : viewletConfig !== undefined && viewletConfig.length > 0 + ? viewletConfig : [''] // Get component from viewlet descriptor lookup