Skip to content

Commit bea3119

Browse files
committed
added undefined filePath check in the method resolvePathToFile
1 parent b1d558b commit bea3119

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/utils/filePath.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
export function resolvePathToFile(filePath, files) {
2+
if (typeof filePath === 'undefined') {
3+
return false;
4+
}
5+
26
const filePathArray = filePath.split('/');
37
let resolvedFile;
48
let currentFile = files.find(file => file.name === 'root');

0 commit comments

Comments
 (0)