diff --git a/src/pages/iou/WaypointEditor.js b/src/pages/iou/WaypointEditor.js index a6e9e17db0f4..c043c5d8db30 100644 --- a/src/pages/iou/WaypointEditor.js +++ b/src/pages/iou/WaypointEditor.js @@ -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'; } diff --git a/src/pages/iou/WaypointEditorPage.js b/src/pages/iou/WaypointEditorPage.js index fc659c7806ab..51c03623fb50 100644 --- a/src/pages/iou/WaypointEditorPage.js +++ b/src/pages/iou/WaypointEditorPage.js @@ -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);