Skip to content

Commit

Permalink
chore(snc): resolve final build-finish error (#5186)
Browse files Browse the repository at this point in the history
reorder an `if` statement such that a strictNullCheck violation for
`diagnostic.absFilePath` being of type `string|undefined` where
`isRemoteUrl` only accepts `string`s is reported. since `isRemoteUrl`
returns `false` for falsy values with no side effects, this was deemed
a safe change to make
  • Loading branch information
rwaskiewicz committed Dec 18, 2023
1 parent 5e9e629 commit 964c801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/build/build-finish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ const cleanupUpdateMsg = (logger: d.Logger, msg: string, fileNames: string[]) =>
*/
const cleanDiagnosticsRelativePath = (config: d.Config, diagnostics: ReadonlyArray<d.Diagnostic>): void => {
diagnostics.forEach((diagnostic) => {
if (!diagnostic.relFilePath && !isRemoteUrl(diagnostic.absFilePath) && diagnostic.absFilePath && config.rootDir) {
if (!diagnostic.relFilePath && diagnostic.absFilePath && !isRemoteUrl(diagnostic.absFilePath) && config.rootDir) {
diagnostic.relFilePath = relative(config.rootDir, diagnostic.absFilePath);
}
});
Expand Down

0 comments on commit 964c801

Please sign in to comment.