Fix reply composer preview button

closes #238
This commit is contained in:
Toby Zerner 2015-08-31 13:27:04 +09:30
parent af2307868a
commit 283abb88c2
2 changed files with 4 additions and 4 deletions

View File

@ -61,9 +61,9 @@ export default class DiscussionPage extends Page {
if (idParam && idParam.split('-')[0] === this.discussion.id()) {
e.preventDefault();
const near = Number(m.route.param('near')) || 1;
const near = m.route.param('near') || '1';
if (near !== Number(this.near)) {
if (near !== String(this.near)) {
this.stream.goToNumber(near);
}

View File

@ -34,9 +34,9 @@ export default function(app) {
* @return {String}
*/
app.route.discussion = (discussion, near) => {
return app.route(near > 1 ? 'discussion.near' : 'discussion', {
return app.route(near && near !== 1 ? 'discussion.near' : 'discussion', {
id: discussion.id() + '-' + discussion.slug(),
near: near > 1 ? near : undefined
near: near && near !== 1 ? near : undefined
});
};