Fix test-repo crash on non-existent folder. (#1444)
This commit is contained in:
parent
b2a3ab2918
commit
427ba7dfc8
@ -34,7 +34,7 @@ const getCursor = (collection, extension, entries, index) => {
|
||||
};
|
||||
|
||||
const getFolderEntries = (folder, extension) => {
|
||||
return Object.keys(window.repoFiles[folder])
|
||||
return Object.keys(window.repoFiles[folder] || {})
|
||||
.filter(path => path.endsWith(`.${ extension }`))
|
||||
.map(path => ({
|
||||
file: { path: `${ folder }/${ path }` },
|
||||
|
Loading…
x
Reference in New Issue
Block a user