@placekit/autocomplete-react
Advanced tools
Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
@@ -1,2 +0,2 @@ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.1 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.2 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
'use strict'; | ||
@@ -27,3 +27,3 @@ | ||
React.useEffect(() => { | ||
if (!target.current) { | ||
if (!target?.current) { | ||
return; | ||
@@ -90,3 +90,3 @@ } | ||
return output; | ||
}, [options, onOpen, onClose, onResults, onPick, onError, onGeolocation, onFreeForm, ref]); | ||
}, [options, onOpen, onClose, onResults, onPick, onError, onGeolocation, onFreeForm]); | ||
const { | ||
@@ -98,3 +98,3 @@ target, | ||
React.useEffect(() => { | ||
if (target.current && typeof ref !== 'undefined') { | ||
if (target?.current && ref) { | ||
if (typeof ref === 'function') { | ||
@@ -101,0 +101,0 @@ ref(target.current); |
@@ -1,2 +0,2 @@ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.1 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.2 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
import type { PKAClient, PKAHandlers, PKAOptions } from '@placekit/autocomplete-js'; | ||
@@ -3,0 +3,0 @@ |
@@ -1,2 +0,2 @@ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.1 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
/*! @placekit/autocomplete-react v1.0.0-alpha.2 | © placekit.io | MIT license | https://github.com/placekit/autocomplete-react#readme */ | ||
import _extends from '@babel/runtime/helpers/extends'; | ||
@@ -16,3 +16,3 @@ import PropTypes from 'prop-types'; | ||
useEffect(() => { | ||
if (!target.current) { | ||
if (!target?.current) { | ||
return; | ||
@@ -79,3 +79,3 @@ } | ||
return output; | ||
}, [options, onOpen, onClose, onResults, onPick, onError, onGeolocation, onFreeForm, ref]); | ||
}, [options, onOpen, onClose, onResults, onPick, onError, onGeolocation, onFreeForm]); | ||
const { | ||
@@ -87,3 +87,3 @@ target, | ||
useEffect(() => { | ||
if (target.current && typeof ref !== 'undefined') { | ||
if (target?.current && ref) { | ||
if (typeof ref === 'function') { | ||
@@ -90,0 +90,0 @@ ref(target.current); |
{ | ||
"name": "@placekit/autocomplete-react", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"author": "PlaceKit <support@placekit.io>", | ||
@@ -5,0 +5,0 @@ "description": "PlaceKit Autocomplete React library", |
18993