sort existing files before displaying

This commit is contained in:
Neelesh Singh 2020-08-04 23:46:25 +05:30 committed by GitHub
parent 4d7f6f55c1
commit 1c02d45fd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -227,7 +227,12 @@ const files = (state, action) => {
return file;
});
default:
return state;
return state.map((file) => {
if (file.name === 'root') {
file.children = sortedChildrenId(state, file.children);
}
return file;
});
}
};