Fixed javascript error accouring when enter is pressed in empty location input.