Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Prevent sending requests if the request URL is not set #5

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {

const _request = (text) => {
_abortRequests();
if (!url) {
return;
}
if (supportedPlatform() && text && text.length >= props.minLength) {
const request = new XMLHttpRequest();
_requests.push(request);
Expand Down