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

@vtex/pickup-points-modal

Package Overview
Dependencies
Maintainers
22
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vtex/pickup-points-modal - npm Package Compare versions

Comparing version 0.1.35 to 0.1.36

30

lib/components/AskForGeolocation.js

@@ -70,16 +70,22 @@ 'use strict';

if (props.askForGeolocation && props.status === _constants.WAITING) {
_this.handleGeolocationStatus(_constants.WAITING);
navigator.permissions && navigator.permissions.query({ name: 'geolocation' }).then(function (permission) {
_this.handleCurrentPosition(permission);
});
// Hard coded coords for development
if (window.location.host.includes(_constants.VTEXLOCAL) || window.location.host.includes(_constants.LOCALHOST)) {
_this.getCurrentPositionSuccess({
coords: {
latitude: -22.9432587,
longitude: -43.1862642
}
});
return;
}
props.googleMaps && (0, _CurrentPosition.getCurrentPosition)(_this.getCurrentPositionSuccess, _this.getCurrentPositionError);
!navigator.permissions && _this.handleCurrentPosition();
}
}, _this.handleCurrentPosition = function (permission) {
_this.handleGeolocationStatus(permission && permission.state === _constants.GRANTED || window.location.host.includes(_constants.VTEXLOCAL) || window.location.host.includes(_constants.LOCALHOST) ? _constants.SEARCHING : _constants.WAITING);
// Hard coded coords for development
if (window.location.host.includes(_constants.VTEXLOCAL) || window.location.host.includes(_constants.LOCALHOST)) {
_this.getCurrentPositionSuccess({
coords: {
latitude: -22.9432587,
longitude: -43.1862642
}
});
return;
}
props.googleMaps && (0, _CurrentPosition.getCurrentPosition)(_this.getCurrentPositionSuccess, _this.getCurrentPositionError);
}, _this.getCurrentPositionSuccess = function (position) {

@@ -86,0 +92,0 @@ _this.handleGeolocationStatus(_constants.SEARCHING);

2

package.json
{
"name": "@vtex/pickup-points-modal",
"version": "0.1.35",
"version": "0.1.36",
"description": "Pickup Points Modal React component",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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