Skip to content

Commit

Permalink
Merge pull request #26371 from Pujan92/fix/25686
Browse files Browse the repository at this point in the history
  • Loading branch information
thienlnam authored Aug 31, 2023
2 parents 5d88b4a + d15f406 commit 185ba7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/iou/WaypointEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function WaypointEditor({transactionID, route: {params: {iouType = '', waypointI

// If the user is online and they are trying to save a value without using the autocomplete, show an error message instructing them to use a selected address instead.
// That enables us to save the address with coordinates when it is selected
if (!isOffline && waypointValue !== '') {
if (!isOffline && waypointValue !== '' && waypointAddress !== waypointValue) {
errors[`waypoint${waypointIndex}`] = 'distance.errors.selectSuggestedAddress';
}

Expand Down
4 changes: 1 addition & 3 deletions src/pages/iou/WaypointEditorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,5 @@ WaypointEditorPage.displayName = 'WaypointEditorPage';
WaypointEditorPage.propTypes = propTypes;
WaypointEditorPage.defaultProps = defaultProps;
export default withOnyx({
// We must provide a default value for transactionID here, otherwise the component won't mount
// because withOnyx returns null until all the keys are defined
transactionID: {key: ONYXKEYS.IOU, selector: (iou) => (iou && iou.transactionID) || ''},
transactionID: {key: ONYXKEYS.IOU, selector: (iou) => iou && iou.transactionID},
})(WaypointEditorPage);

0 comments on commit 185ba7b

Please sign in to comment.