diff options
Diffstat (limited to 'app/client/modules/biggan/biggan.actions.js')
| -rw-r--r-- | app/client/modules/biggan/biggan.actions.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/client/modules/biggan/biggan.actions.js b/app/client/modules/biggan/biggan.actions.js index 10fd68a..e39c22c 100644 --- a/app/client/modules/biggan/biggan.actions.js +++ b/app/client/modules/biggan/biggan.actions.js @@ -201,8 +201,10 @@ export const load_encodings = () => dispatch => { // loading function }).then(res => { const [folders, files] = res + console.log('encodings: ', folders.length, 'folders, ', files.length, 'files') const folder_name_lookup = {} const encodings = {} + const encoding_order = [] folders.forEach(folder => { folder_name_lookup[folder.id] = folder.name encodings[folder.name] = [] @@ -214,11 +216,14 @@ export const load_encodings = () => dispatch => { folders.forEach(folder => { if (!encodings[folder.name].length) { delete encodings[folder.name] + } else { + encoding_order.push(folder.name) } }) dispatch({ type: types.biggan.load_encodings, - encodings + encodings, + encoding_order, }) }) } |
