hardcodes entities to preserve sort order
@@ -2,6 +2,7 @@ import Ember from 'ember';
import connect from 'ember-redux/components/connect';
const { Component } = Ember;
+const entities = ['datasets', 'metrics', 'flows']; // hardcoded here to maintain the sort order
/**
* Selector function that takes a Redux Store to extract
* state props for the browser-view
@@ -9,9 +10,7 @@ const { Component } = Ember;
* @return {Object}
*/
const stateToComputed = ({ browse: { browseData = {} } = {} }) => ({
- browseData: Object.keys(browseData)
- .sort() // Datasets implicitly comes first [datasets, flows, metrics]
- .map(browseDatum =>
+ browseData: entities.map(browseDatum =>
Object.assign(
{ entity: browseDatum }, // assigns key name to resulting object
browseData[browseDatum]
