added undefined filePath check in the method resolvePathToFile
This commit is contained in:
parent
8754848699
commit
c9b40bbd74
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