Skip to content

Commit

Permalink
fix: remove undefined values from hydrate
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Dec 21, 2023
1 parent b03b1d0 commit 1069438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion workspace/marqua/src/fs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export function traverse(
if (data && Object.keys(data).length) return data;
if (!hydrate) return []; // skip this file
const breadcrumb = path.split(/[/\\]/).reverse();
return hydrate({ breadcrumb, buffer, parse, siblings: tree });
return hydrate({ breadcrumb, buffer, parse, siblings: tree }) ?? [];
} else if (level !== 0) {
const depth = level < 0 ? level : level - 1;
const options = { entry: path, depth, compile: fn };
Expand Down

0 comments on commit 1069438

Please sign in to comment.