added undefined filePath check in the method resolvePathToFile
This commit is contained in:
parent
b1d558b3fc
commit
bea3119147
1 changed files with 4 additions and 0 deletions
|
@ -1,4 +1,8 @@
|
||||||
export function resolvePathToFile(filePath, files) {
|
export function resolvePathToFile(filePath, files) {
|
||||||
|
if (typeof filePath === 'undefined') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const filePathArray = filePath.split('/');
|
const filePathArray = filePath.split('/');
|
||||||
let resolvedFile;
|
let resolvedFile;
|
||||||
let currentFile = files.find(file => file.name === 'root');
|
let currentFile = files.find(file => file.name === 'root');
|
||||||
|
|
Loading…
Reference in a new issue