Skip to content

Commit

Permalink
Fix access on undefined in selector
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Aug 4, 2023
1 parent c7a4be1 commit ca0d60d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DistanceRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ DistanceRequest.displayName = 'DistanceRequest';
DistanceRequest.propTypes = propTypes;
DistanceRequest.defaultProps = defaultProps;
export default withOnyx({
transactionID: {key: ONYXKEYS.IOU, selector: (iou) => iou.transactionID || ''},
transactionID: {key: ONYXKEYS.IOU, selector: (iou) => (iou && iou.transactionID) || ''},
})(DistanceRequest);

0 comments on commit ca0d60d

Please sign in to comment.