1
0
mirror of https://github.com/flarum/core.git synced 2025-07-12 20:36:28 +02:00

Fix unnecessary ?near=1 in some URLs

This commit is contained in:
Toby Zerner
2015-08-13 13:06:55 +09:30
parent c4992407aa
commit dc56e7dc0f
2 changed files with 6 additions and 4 deletions

View File

@ -65,8 +65,10 @@ export default class DiscussionPage extends mixin(Component, evented) {
if (m.route.param('id') === this.discussion.id()) {
e.preventDefault();
if (Number(m.route.param('near')) !== Number(this.near)) {
this.stream.goToNumber(m.route.param('near') || 1);
const near = Number(m.route.param('near')) || 1;
if (near !== Number(this.near)) {
this.stream.goToNumber(near);
}
this.near = null;