-
-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: remove useless spread #3600
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3600 +/- ##
==========================================
- Coverage 94.71% 94.71% -0.01%
==========================================
Files 158 158
Lines 9555 9552 -3
Branches 2813 2789 -24
==========================================
- Hits 9050 9047 -3
Misses 505 505 ☔ View full report in Codecov by Sentry. |
@@ -80,7 +80,7 @@ class ClientRequestImpl { | |||
let methodUpperCase = this.method.toUpperCase() | |||
|
|||
const headerValues: Record<string, string> = { | |||
...(args?.header ?? {}), | |||
...args?.header, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note) spread fallback is redundant
const a = undefined
console.log({ ...a, b: 1 })
// { b: 1}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put out a PR related to this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thank you both! |
The author should do the following, if applicable
bun run format:fix && bun run lint:fix
to format the code