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

Convert to int before checking start

This commit is contained in:
Toby Zerner
2015-01-26 11:45:21 +10:30
parent b57a8d3bc2
commit 774b74dd0f

View File

@@ -40,9 +40,9 @@ export default Ember.Route.extend({
// Thus, controller.loaded would still be true and the // Thus, controller.loaded would still be true and the
// startWasChanged event would be triggered inappropriately. // startWasChanged event would be triggered inappropriately.
var controller = this.get('controller'), var controller = this.get('controller'),
oldStart = this.get('controller.start'); oldStart = parseInt(this.get('controller.start'));
Ember.run.next(function() { Ember.run.next(function() {
if (! params.start || ! controller || ! controller.get('loaded') || params.start === oldStart) { if (! params.start || ! controller || ! controller.get('loaded') || parseInt(params.start) === oldStart) {
return; return;
} }
controller.trigger('startWasChanged', params.start); controller.trigger('startWasChanged', params.start);