Skip to content

Commit edf684c

Browse files
committed
Merge pull request #783 from severian/cleanup-mount
[fixed] Clean up mounted route component on unmount so we don't leak references
2 parents 6bfc79e + 848361e commit edf684c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

modules/RouteHandlerMixin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ var RouteHandlerMixin = {
3030
this._updateRouteComponent();
3131
},
3232

33+
componentWillUnmount: function () {
34+
this.context.setRouteComponentAtDepth(this.getRouteDepth(), null);
35+
},
36+
3337
_updateRouteComponent: function () {
3438
this.context.setRouteComponentAtDepth(this.getRouteDepth(), this.refs[REF_NAME]);
3539
},

0 commit comments

Comments
 (0)