diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-10-13 13:12:31 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-10-13 13:12:31 +0200 |
| commit | 476fbea81b8897246ac6fe3b381ea2e39d02fa2e (patch) | |
| tree | a765a88d6795450d970b27ad1adaa016d97f89dd /app/client/modules/biggan/biggan.actions.js | |
| parent | 8effb899b2d482d1bac62679ebd3a6315def8549 (diff) | |
actual encoding order..
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, }) }) } |
