Skip to content

Commit

Permalink
make sure length settings and urls are correct
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrent committed Nov 25, 2013
1 parent 494c2fa commit e501f80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/Track.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ Genoverse.Track = Base.extend({
}

this[obj].constructor.extend(mvcSettings[obj].func);

if (obj === 'model' && typeof test.url !== 'undefined') {
this.model.setURL(); // make sure the URL is correct
}
}
}
}
Expand Down Expand Up @@ -191,7 +195,7 @@ Genoverse.Track = Base.extend({

getSettingsForLength: function () {
for (var i = 0; i < this.lengthMap.length; i++) {
if (this.browser.length > this.lengthMap[i][0]) {
if (this.browser.length > this.lengthMap[i][0] || this.browser.length === 1 && this.lengthMap[i][0] === 1) {
return this.lengthMap[i][1];
}
}
Expand Down

0 comments on commit e501f80

Please sign in to comment.