Skip to content

chore: remove unnecessary await #821

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

Closed
wants to merge 1 commit into from
Closed

Conversation

iiio2
Copy link
Contributor

@iiio2 iiio2 commented Jul 9, 2024

Here val is already awaited. In the next line in _body for conditional checking, we have given await again for val. Also the code editor is saying await has no effect here like that. That's why I thought may be we may remove it.

Copy link

codecov bot commented Jul 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.54%. Comparing base (a58d7c9) to head (d95f7ef).
Report is 132 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #821      +/-   ##
==========================================
- Coverage   77.83%   77.54%   -0.30%     
==========================================
  Files          47       41       -6     
  Lines        4286     2979    -1307     
  Branches      611      667      +56     
==========================================
- Hits         3336     2310    -1026     
+ Misses        933      667     -266     
+ Partials       17        2      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -85,7 +85,7 @@ class H3App implements App {
const val = await layer.handler(event);

// 5. Handle response
const _body = val === undefined ? undefined : await val;
const _body = val === undefined ? undefined : val;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we remove await here, maybe we don't even need this ternary ?

@pi0
Copy link
Member

pi0 commented Jul 11, 2024

changed after #822

@pi0 pi0 closed this Jul 11, 2024
@iiio2
Copy link
Contributor Author

iiio2 commented Jul 11, 2024

Thanks @pi0

@iiio2 iiio2 deleted the iiio2/patch-69362 branch July 11, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants