Skip to content

Commit

Permalink
fix: empty dynamic assets before unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
daysai committed Aug 19, 2019
1 parent 3305ded commit 0126692
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@
"react-dom": ">=15.0.0"
},
"dependencies": {
"history": "^4.6.1",
"path-to-regexp": "^1.7.0",
"url-parse": "^1.1.9"
},
"devDependencies": {
"@commitlint/cli": "^7.5.2",
"@commitlint/config-conventional": "^7.5.0",
"@ice/spec": "^0.1.4",
"@types/history": "^4.7.0",
"@types/jest": "^24.0.12",
"@types/node": "^12.0.0",
"@types/path-to-regexp": "^1.7.0",
Expand Down
3 changes: 3 additions & 0 deletions src/AppRoute.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ export default class AppRoute extends React.Component<AppRouteProps, AppRouteSta
}

componentWillUnmount() {
// Empty useless assets before unmount
const { useShadow } = this.props;
emptyAssets(useShadow);
this.unmounted = true;
setIcestark('root', null);
}
Expand Down

0 comments on commit 0126692

Please sign in to comment.