Skip to content

Commit

Permalink
fix: Dashboard crashes when setting unique filter on pointer field …
Browse files Browse the repository at this point in the history
…in data browser (#2660)
  • Loading branch information
mtrezza authored Mar 6, 2025
2 parents 887cbfe + de2f53a commit 68fdbe8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/BrowserCell/BrowserCell.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export default class BrowserCell extends Component {
this.props.appId,
this.props.value.className
);
let dataValue = this.props.value.id;
let value = this.props.value;
let dataValue = this.props.value.id || this.props.value.objectId;
if (defaultPointerKey !== 'objectId') {
dataValue = this.props.value.get(defaultPointerKey);
if (dataValue && typeof dataValue === 'object') {
Expand All @@ -94,13 +95,13 @@ export default class BrowserCell extends Component {
if (this.props.value && this.props.value.__type) {
const object = new Parse.Object(this.props.value.className);
object.id = this.props.value.objectId;
this.props.value = object;
value = object;
}

content = this.props.onPointerClick ? (
<Pill
value={dataValue}
onClick={this.props.onPointerClick.bind(undefined, this.props.value)}
onClick={this.props.onPointerClick.bind(undefined, value)}
followClick={true}
shrinkablePill
/>
Expand Down

0 comments on commit 68fdbe8

Please sign in to comment.