1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 08:56:38 +02:00

wip fix: forum/components/DiscussionPage

- rename onunload to onremove. We are still unable to cancel the unload though.
This commit is contained in:
Alexander Skvortsov
2020-08-09 23:43:44 -04:00
committed by Franz Liedke
parent f93a255a2f
commit 4402dc81ac

View File

@@ -49,7 +49,7 @@ export default class DiscussionPage extends Page {
this.bodyClass = 'App--discussion';
}
onunload(e) {
onremove(vnode) {
// If we have routed to the same discussion as we were viewing previously,
// cancel the unloading of this controller and instead prompt the post
// stream to jump to the new 'near' param.
@@ -57,7 +57,7 @@ export default class DiscussionPage extends Page {
const idParam = m.route.param('id');
if (idParam && idParam.split('-')[0] === this.discussion.id()) {
e.preventDefault();
//e.preventDefault();
const near = m.route.param('near') || '1';