Skip to content

Commit 9f3b807

Browse files
Fixing issue preventing polygon from rendering
Issue: #114 Fix: call to renderPolygon() was inside a conditional that was impossible to meet.
1 parent f626c20 commit 9f3b807

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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)