Skip to content

Commit 68fdbe8

Browse files
authored
fix: Dashboard crashes when setting unique filter on pointer field in data browser (#2660)
2 parents 887cbfe + de2f53a commit 68fdbe8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/BrowserCell/BrowserCell.react.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ export default class BrowserCell extends Component {
6868
this.props.appId,
6969
this.props.value.className
7070
);
71-
let dataValue = this.props.value.id;
71+
let value = this.props.value;
72+
let dataValue = this.props.value.id || this.props.value.objectId;
7273
if (defaultPointerKey !== 'objectId') {
7374
dataValue = this.props.value.get(defaultPointerKey);
7475
if (dataValue && typeof dataValue === 'object') {
@@ -94,13 +95,13 @@ export default class BrowserCell extends Component {
9495
if (this.props.value && this.props.value.__type) {
9596
const object = new Parse.Object(this.props.value.className);
9697
object.id = this.props.value.objectId;
97-
this.props.value = object;
98+
value = object;
9899
}
99100

100101
content = this.props.onPointerClick ? (
101102
<Pill
102103
value={dataValue}
103-
onClick={this.props.onPointerClick.bind(undefined, this.props.value)}
104+
onClick={this.props.onPointerClick.bind(undefined, value)}
104105
followClick={true}
105106
shrinkablePill
106107
/>

0 commit comments

Comments
 (0)