Skip to content

Commit

Permalink
fix(core): repair sourcemap creation in createNodes (nrwl#22851)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKless authored Apr 17, 2024
1 parent 801a22b commit e05cb4f
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ export function selectSourceInfo(
// When the key is a prefix of the filter, we can record it as the root source.
// Use the most specific key for the root "." source value.
// e.g. `targets.build` takes precedence over `targets`
if (!rootKey || key.startsWith(rootKey)) {
if (!rootKey || key?.startsWith(rootKey)) {
rootKey = key;
rootSource = value;
}
2 changes: 1 addition & 1 deletion graph/ui-tooltips/src/lib/sourcemap-info-tooltip.tsx
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ export function SourcemapInfoToolTip({
// Every other property within in the target has the form `target.${targetName}.${propertyName}
const isTarget = propertyKey.split('.').length === 2;

const docsUrlSlug: string | undefined = plugin.startsWith('@nx/')
const docsUrlSlug: string | undefined = plugin?.startsWith('@nx/')
? plugin.replace('@nx/', '').split('/')[0]
: undefined;

2 changes: 1 addition & 1 deletion packages/nx/src/project-graph/plugins/utils.ts
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ export async function runCreateNodesInParallel(
// Existing behavior is to ignore null results of
// createNodes function.
if (r) {
results.push(r);
results.push({ ...r, file, pluginName: plugin.name });
}
});
});

0 comments on commit e05cb4f

Please sign in to comment.