mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 21:43:38 +08:00
Prevent JS error for now
This commit is contained in:
parent
7a7ed695e2
commit
5115b6fb09
|
@ -82,13 +82,14 @@ export default class DiscussionPage extends Component {
|
|||
|
||||
// Hold up there skippy! If the slug in the URL doesn't match up, we'll
|
||||
// redirect so we have the correct one.
|
||||
if (m.route.param('id') === discussion.id() && m.route.param('slug') !== discussion.slug()) {
|
||||
var params = m.route.param();
|
||||
params.slug = discussion.slug();
|
||||
params.near = params.near || '';
|
||||
m.route(app.route('discussion.near', params), null, true);
|
||||
return;
|
||||
}
|
||||
// Waiting on https://github.com/lhorie/mithril.js/issues/539
|
||||
// if (m.route.param('id') === discussion.id() && m.route.param('slug') !== discussion.slug()) {
|
||||
// var params = m.route.param();
|
||||
// params.slug = discussion.slug();
|
||||
// params.near = params.near || '';
|
||||
// m.route(app.route('discussion.near', params), null, true);
|
||||
// return;
|
||||
// }
|
||||
|
||||
this.streamContent.goToNumber(this.currentNear, true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user