diff --git a/frontend/src/metabase/questions/components/CollectionBadge.jsx b/frontend/src/metabase/questions/components/CollectionBadge.jsx index c8f84a6623bd3755873b7ef3b609960cc027e747..33bdbaa4d60d55e40e088b4d19b957b1d7e35015 100644 --- a/frontend/src/metabase/questions/components/CollectionBadge.jsx +++ b/frontend/src/metabase/questions/components/CollectionBadge.jsx @@ -13,14 +13,19 @@ import cx from "classnames"; entityType: "collections", entityId: (state, props) => props.collectionId || "root", wrapped: true, + loadingAndErrorWrapper: false, + properties: ["name"], }) class CollectionBadge extends React.Component { render() { - const { analyticsContext, object } = this.props; + const { analyticsContext, object, className } = this.props; + if (!object) { + return null; + } return ( <Link to={Urls.collection(object.id)} - className={cx("inline-block link")} + className={cx(className, "block link")} data-metabase-event={`${analyticsContext};Collection Badge Click`} > <Flex align="center">