Skip to content

Commit c7dacd2

Browse files
CopilotMiYanni
andcommitted
Remove unnecessary const assignment for directly returned EventBasedError
Co-authored-by: MiYanni <[email protected]>
1 parent efa46c2 commit c7dacd2

File tree

3 files changed

+1
-47
lines changed

3 files changed

+1
-47
lines changed

sample/yarn.lock

Lines changed: 0 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vscode-dotnet-runtime-library/src/Acquisition/DotnetCoreAcquisitionWorker.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ To keep your .NET version up to date, please reconnect to the internet at your s
406406
if (error?.error?.message !== undefined) // DotnetAcquisitionError is a bad but common pattern where the error is included in the thrown object
407407
{
408408
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
409-
const convertedError = new EventBasedError(error?.constructor?.name ?? 'DotnetAcquisitionError', error?.error?.message, error?.stack);
410-
return convertedError;
409+
return new EventBasedError(error?.constructor?.name ?? 'DotnetAcquisitionError', error?.error?.message, error?.stack);
411410
}
412411

413412
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access

vscode-dotnet-runtime-library/yarn.lock

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)