Skip to content

Commit

Permalink
v0.8.0-rc.2
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulLeCam committed Sep 22, 2015
1 parent 8cc28e9 commit 3da109b
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"no-unused-vars": 2,
"no-use-before-define": 1,
"quotes": [2, "single", "avoid-escape"],
"jsx-quotes": [1, "prefer-single"],
"constructor-super": 2,
"no-class-assign": 2,
"no-const-assign": 2,
Expand All @@ -79,7 +80,6 @@
"react/jsx-max-props-per-line": 0,
"react/jsx-no-duplicate-props": 2,
"react/jsx-no-undef": 2,
"react/jsx-quotes": 1,
"react/jsx-sort-prop-types": 1,
"react/jsx-sort-props": 1,
"react/jsx-uses-react": 1,
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.8.0-rc.2 (22/09/15)

Check if `Popup` content node exists before trying to unmount.

## v0.8.0-rc.1 (16/09/15)

- Updated React to v0.14.0-rc1.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ L.marker(position).addTo(map)
**React-Leaflet**
```js
import React from 'react';
import { render } from 'react-dom';
import { Map, Marker, Popup, TileLayer } from 'react-leaflet';

const position = [51.505, -0.09];
Expand All @@ -53,7 +54,7 @@ const map = (
</Map>
);

React.render(map, document.getElementById('map-container'));
render(map, document.getElementById('map-container'));
```
Note that the `<Map>` component creates its own `<div>` container for the map, it does not get attached to an existing node.

Expand Down
4 changes: 3 additions & 1 deletion example/build/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -1374,7 +1374,9 @@ var Popup = (function (_MapComponent) {
}, {
key: 'removePopupContent',
value: function removePopupContent() {
(0, _reactDom.unmountComponentAtNode)(this.leafletElement._contentNode);
if (this.leafletElement._contentNode) {
(0, _reactDom.unmountComponentAtNode)(this.leafletElement._contentNode);
}
}
}, {
key: 'render',
Expand Down
4 changes: 3 additions & 1 deletion lib/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ var Popup = (function (_MapComponent) {
}, {
key: 'removePopupContent',
value: function removePopupContent() {
(0, _reactDom.unmountComponentAtNode)(this.leafletElement._contentNode);
if (this.leafletElement._contentNode) {
(0, _reactDom.unmountComponentAtNode)(this.leafletElement._contentNode);
}
}
}, {
key: 'render',
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-leaflet",
"version": "0.8.0-rc.1",
"version": "0.8.0-rc.2",
"description": "React components for Leaflet maps",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -43,16 +43,16 @@
},
"devDependencies": {
"babel": "^5.8.23",
"babel-eslint": "^4.1.2",
"babel-eslint": "^4.1.3",
"babelify": "^6.3.0",
"browserify": "^11.0.1",
"eslint": "^1.4.3",
"eslint-plugin-react": "^3.3.1",
"eslint": "^1.5.0",
"eslint-plugin-react": "^3.4.2",
"gulp": "^3.9.0",
"gulp-load-plugins": "^0.10.0",
"gulp-util": "^3.0.6",
"gulp-webserver": "^0.9.1",
"jest-cli": "^0.5.5",
"jest-cli": "^0.5.7",
"leaflet": "^0.7.5",
"onchange": "^2.0.0",
"react": "^0.14.0-rc1",
Expand Down
4 changes: 3 additions & 1 deletion src/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export default class Popup extends MapComponent {
}

removePopupContent() {
unmountComponentAtNode(this.leafletElement._contentNode);
if (this.leafletElement._contentNode) {
unmountComponentAtNode(this.leafletElement._contentNode);
}
}

render() {
Expand Down

0 comments on commit 3da109b

Please sign in to comment.