Skip to content

Commit

Permalink
fix: cannot read properties of undefined (reading 'split') (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode authored Oct 2, 2024
1 parent 756eb91 commit 1413deb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module.exports = {
* @return {any}
*/
function findNearestEntryPoint(filePath) {
const pathSegments = filePath.split('/');
const pathSegments = (filePath ?? '')?.split('/') ?? [];

for (let i = pathSegments.length - 1; i >= 0; i--) {
const possibleEntryPoint = pathSegments.slice(0, i).join('/');
Expand Down

0 comments on commit 1413deb

Please sign in to comment.