Fix sometimes trying to jump to NaN in the stream

This commit is contained in:
Toby Zerner 2015-05-18 10:37:47 +09:30
parent e77d0e0786
commit c0bf5f81fe

View File

@ -31,7 +31,7 @@ export default class DiscussionPage extends Component {
// its posts relationship has been loaded (i.e. we've viewed this
// discussion before), then we can proceed with displaying it immediately.
// If not, we'll make an API request first.
this.currentNear = m.route.param('near');
this.currentNear = m.route.param('near') || 0;
var params = this.params();
params.include = params.include.join(',');
app.store.find('discussions', m.route.param('id'), params).then(this.setupDiscussion.bind(this));