Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-geosuggest-plus

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-geosuggest-plus - npm Package Compare versions

Comparing version 1.14.1 to 1.15.0

15

dist/Geosuggest.js

@@ -316,3 +316,5 @@ /* global google */

var suggestsCount = this.state.suggests.length - 1,
var suggestsLength = this.state.suggests.length;
var recentsLength = this.state.recents.length;
var suggestsCount = recentsLength + suggestsLength - 1,
next = direction === 'next',

@@ -324,3 +326,3 @@ newActiveSuggest = null,

for (i; i <= suggestsCount; i++) {
if (this.state.suggests[i] === this.state.activeSuggest) {
if (this.state.suggests[i] === this.state.activeSuggest || this.state.recents[i] === this.state.activeSuggest) {
newIndex = next ? i + 1 : i - 1;

@@ -335,3 +337,10 @@ }

if (newIndex >= 0 && newIndex <= suggestsCount) {
newActiveSuggest = this.state.suggests[newIndex];
// if suggests not full but recents is
if (!suggestsLength && recentsLength) {
newActiveSuggest = this.state.recents[newIndex];
} else if (suggestsLength && recentsLength && newIndex >= suggestsLength) {
newActiveSuggest = this.state.recents[newIndex];
} else {
newActiveSuggest = this.state.suggests[newIndex];
}
}

@@ -338,0 +347,0 @@

{
"name": "react-geosuggest-plus",
"version": "1.14.1",
"version": "1.15.0",
"description": "A React autosuggest for the Google Maps Places API.",

@@ -34,3 +34,4 @@ "main": "./dist/Geosuggest",

"scripts": {
"prepublish": "make build"
"prepublish": "make build",
"postversion": "git push && git push --tags"
},

@@ -37,0 +38,0 @@ "readmeFilename": "README.md",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc