File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ class TransitiveCanvasOverlay extends MapLayer {
51
51
52
52
componentWillReceiveProps ( nextProps ) {
53
53
// Check if we received new transitive data
54
- if ( ! isEqual ( nextProps . transitiveData , this . props . transitiveData ) ) {
54
+ if ( this . _transitive && ! isEqual ( nextProps . transitiveData , this . props . transitiveData ) ) {
55
55
this . _transitive . updateData ( nextProps . transitiveData )
56
56
if ( ! nextProps . transitiveData ) this . _transitive . render ( )
57
57
else this . _updateBoundsAndRender ( )
@@ -71,7 +71,12 @@ class TransitiveCanvasOverlay extends MapLayer {
71
71
}
72
72
}
73
73
74
- componentWillUnmount ( ) { }
74
+ componentWillUnmount ( ) {
75
+ if ( this . _transitive ) {
76
+ this . _transitive . updateData ( null )
77
+ this . _transitive . render ( )
78
+ }
79
+ }
75
80
76
81
// Internal Methods
77
82
You can’t perform that action at this time.
0 commit comments