New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-map-gl

Package Overview
Dependencies
Maintainers
12
Versions
293
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-map-gl - npm Package Compare versions

Comparing version 7.0.20 to 7.0.21

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # CHANGELOG

## 7.0.21 (Jan 7, 2023)
- fix `reuseMaps` not removing map children (#2092)
## 7.0.20 (Dec 2, 2022)

@@ -7,0 +11,0 @@

3

dist/es5/components/map.js

@@ -130,3 +130,4 @@ "use strict";

var style = (0, react_1.useMemo)(function () { return (__assign({ position: 'relative', width: '100%', height: '100%' }, props.style)); }, [props.style]);
return (React.createElement("div", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(exports.MapContext.Provider, { value: contextValue }, props.children))));
return (React.createElement("div", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(exports.MapContext.Provider, { value: contextValue },
React.createElement("div", { "mapboxgl-children": "" }, props.children)))));
});

@@ -133,0 +134,0 @@ Map.displayName = 'Map';

@@ -295,2 +295,6 @@ "use strict";

Mapbox.prototype.recycle = function () {
// Clean up unnecessary elements before storing for reuse.
var container = this.map.getContainer();
var children = container.querySelector('[mapboxgl-children]');
children === null || children === void 0 ? void 0 : children.remove();
Mapbox.savedMaps.push(this);

@@ -297,0 +301,0 @@ };

@@ -105,3 +105,4 @@ import * as React from 'react';

}), [props.style]);
return (React.createElement("div", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue }, props.children))));
return (React.createElement("div", { id: props.id, ref: containerRef, style: style }, mapInstance && (React.createElement(MapContext.Provider, { value: contextValue },
React.createElement("div", { "mapboxgl-children": "" }, props.children)))));
});

@@ -108,0 +109,0 @@ Map.displayName = 'Map';

@@ -267,2 +267,6 @@ import { transformToViewState, applyViewStateToTransform, cloneTransform } from '../utils/transform';

recycle() {
// Clean up unnecessary elements before storing for reuse.
const container = this.map.getContainer();
const children = container.querySelector('[mapboxgl-children]');
children === null || children === void 0 ? void 0 : children.remove();
Mapbox.savedMaps.push(this);

@@ -269,0 +273,0 @@ }

{
"name": "react-map-gl",
"description": "React components for Mapbox GL JS-compatible libraries",
"version": "7.0.20",
"version": "7.0.21",
"keywords": [

@@ -6,0 +6,0 @@ "mapbox",

@@ -590,2 +590,7 @@ import {transformToViewState, applyViewStateToTransform, cloneTransform} from '../utils/transform';

recycle() {
// Clean up unnecessary elements before storing for reuse.
const container = this.map.getContainer();
const children = container.querySelector('[mapboxgl-children]');
children?.remove();
Mapbox.savedMaps.push(this);

@@ -592,0 +597,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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