diff --git a/lib/components/Map/index.js b/lib/components/Map/index.js index 64331b4..c12c18a 100644 --- a/lib/components/Map/index.js +++ b/lib/components/Map/index.js @@ -214,7 +214,7 @@ var Map = (_temp = _class = function (_React$Component) { (0, _util.processBooleanOptions)(map, 'MAP_BOOLEAN_OPTIONS', props); if (props.center) { - var center = props.center.center; + var center = props.center; if ((0, _util.isPoint)(center)) { center = (0, _util.getPoint)(center.lng, center.lat); diff --git a/lib/components/_base/util.js b/lib/components/_base/util.js index 9da926d..96ed40a 100644 --- a/lib/components/_base/util.js +++ b/lib/components/_base/util.js @@ -99,7 +99,7 @@ function bindEvents(target, eventKey, events) { } function unBindEvents(target) { - var events = target.events.events; + var events = target.events; if (events) { var eventNames = Object.keys(events); diff --git a/package.json b/package.json index 0fe539c..437cb24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-bmap", - "version": "0.1.6", + "version": "0.1.7", "main": "lib/index.js", "typings": "types/index.d.ts", "repository": { @@ -51,4 +51,4 @@ "webpack": "^3.0.0", "webpack-dev-server": "^2.5.0" } -} +} \ No newline at end of file diff --git a/src/components/Map/index.js b/src/components/Map/index.js index 2db4a67..ee0a608 100644 --- a/src/components/Map/index.js +++ b/src/components/Map/index.js @@ -147,7 +147,7 @@ export default class Map extends React.Component { processBooleanOptions(map, 'MAP_BOOLEAN_OPTIONS', props); if (props.center) { - let { center } = props.center; + let { center } = props; if (isPoint(center)) { center = getPoint(center.lng, center.lat); } diff --git a/src/components/_base/util.js b/src/components/_base/util.js index 8adb8f8..93b6c84 100644 --- a/src/components/_base/util.js +++ b/src/components/_base/util.js @@ -46,7 +46,7 @@ export function bindEvents(target, eventKey, events) { } export function unBindEvents(target) { - const { events } = target.events; + const { events } = target; if (events) { const eventNames = Object.keys(events); for (let i = 0; i < eventNames.length; i += 1) {