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

View file

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