Skip to content

Commit

Permalink
Fix Analysis.getRanges respects order of vars, #8
Browse files Browse the repository at this point in the history
  • Loading branch information
josephguillaume authored Oct 10, 2019
1 parent 2d400bd commit f8e9a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inst/www/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var Analysis = Backbone.Model.extend({
// Return appropriate elements
return($.inArray(e[0],vars)>-1);
});
ranges.sort((e) => $.inArray(e[0],vars));
ranges.sort((a,b) => vars.indexOf(a[0])-vars.indexOf(b[0]));
if(asArray){ return(ranges); }
ranges = {
Variable:ranges.map(function(x){return x[0];}),
Expand Down

0 comments on commit f8e9a99

Please sign in to comment.