Skip to content

Commit

Permalink
fix(InfoWindow): check owner props before getting ref
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchentw committed Nov 16, 2014
1 parent ef2d4cf commit 9022d48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ exports.Map = require("./Map");
"InfoWindow",
BASIC_EVENT_NAMES,
(component, infoWindow) => {
var {context} = component;
infoWindow.open(context.getMap(), context.getInstanceByRef(component.props.owner));
var {context} = component,
{owner} = component.props;
infoWindow.open(
context.getMap(),
owner ? context.getInstanceByRef(owner) : undefined
);
}
],
].forEach((args) => {
Expand Down

0 comments on commit 9022d48

Please sign in to comment.