1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

Use all Mithril lifecycle stubs (#2847)

This commit is contained in:
Alexander Skvortsov
2021-05-09 18:09:45 -04:00
committed by GitHub
parent ceb567779e
commit d4e3254395
17 changed files with 77 additions and 23 deletions

View File

@@ -28,7 +28,9 @@ export default class ConfirmDocumentUnload extends Component {
$(window).on('beforeunload', this.boundHandler);
}
onremove() {
onremove(vnode) {
super.onremove(vnode);
$(window).off('beforeunload', this.boundHandler);
}