added undefined filePath check in the method resolvePathToFile

This commit is contained in:
Mayank Gautam 2020-02-18 09:06:06 +05:30
parent b1d558b3fc
commit bea3119147

View file

@ -1,4 +1,8 @@
export function resolvePathToFile(filePath, files) {
if (typeof filePath === 'undefined') {
return false;
}
const filePathArray = filePath.split('/');
let resolvedFile;
let currentFile = files.find(file => file.name === 'root');