Skip to content

Commit

Permalink
fix: crash when paths is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
CGQAQ authored Dec 6, 2023
1 parent a93ee1c commit fb8f53b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/plugins/with-nx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ export function getAliasForProject(
paths: Record<string, string[]>
): null | string {
// Match workspace libs to their alias in tsconfig paths.
for (const [alias, lookup] of Object.entries(paths)) {
for (const [alias, lookup] of Object.entries(paths ?? {})) {
const lookupContainsDepNode = lookup.some(
(lookupPath) =>
lookupPath.startsWith(node?.data?.root) ||
Expand Down

0 comments on commit fb8f53b

Please sign in to comment.