diff --git a/plugins/ui/src/js/src/elements/Picker.tsx b/plugins/ui/src/js/src/elements/Picker.tsx index dc4d36ae5..d7b1b74ef 100644 --- a/plugins/ui/src/js/src/elements/Picker.tsx +++ b/plugins/ui/src/js/src/elements/Picker.tsx @@ -25,10 +25,13 @@ function Picker({ children, ...props }: PickerProps) { const isObjectView = isElementOfType(children, ObjectView); - const maybeExportedObject = isObjectView ? children.props.object : null; + const maybeExportedTable = + isObjectView && children.props.object.type === 'Table' + ? children.props.object + : null; const { data: table } = usePromiseFactory(fetchReexportedTable, [ - maybeExportedObject, + maybeExportedTable, ]); useTableClose(table);