Skip to content

Commit cfc00d9

Browse files
authored
Merge pull request #143 from blainegarrett/master
Fixing issue preventing polygon from rendering
2 parents aca02a0 + 2b46240 commit cfc00d9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

dist/components/Polygon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@
112112
if (this.props.map !== prevProps.map) {
113113
if (this.polygon) {
114114
this.polygon.setMap(null);
115-
this.renderPolygon();
116115
}
116+
this.renderPolygon();
117117
}
118118
}
119119
}, {
@@ -206,4 +206,4 @@
206206
};
207207

208208
exports.default = Polygon;
209-
});
209+
});

src/components/Polygon.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ export class Polygon extends React.Component {
2525

2626
componentDidUpdate(prevProps) {
2727
if (this.props.map !== prevProps.map) {
28-
if (this.polygon) {
29-
this.polygon.setMap(null);
30-
this.renderPolygon();
31-
}
28+
if (this.polygon) {
29+
this.polygon.setMap(null);
30+
}
31+
this.renderPolygon();
3232
}
3333
}
3434

0 commit comments

Comments
 (0)