diff --git a/src/screens/WasteCollectionScreen.js b/src/screens/WasteCollectionScreen.js index 4845633bc..d5d1cb037 100644 --- a/src/screens/WasteCollectionScreen.js +++ b/src/screens/WasteCollectionScreen.js @@ -124,7 +124,7 @@ export const WasteCollectionScreen = ({ navigation }) => { return address.street || ''; } - return `${address.street} (${address.zip} ${address.city})`; + return `${address.street} (${[address.zip, address.city].filter(Boolean).join(' ')})`; }, [wasteAddressesTwoStep] ); @@ -151,7 +151,7 @@ export const WasteCollectionScreen = ({ navigation }) => { // return empty list on an exact match (except for capitalization) const filterStreets = useCallback( (currentInputValue, addressesData) => { - if (wasteAddressesTwoStep && inputValueCity === '') return []; + if (wasteAddressesTwoStep && a === '') return []; if (isInputAutoFocus && currentInputValue === '' && !isStreetInputFocused) return []; const streets = addressesData