-
Notifications
You must be signed in to change notification settings - Fork 971
Conversation
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.
@NejcZdovc This works well, but overall we are just doing a falsy check for field (seems to be able to be either false or undefined)
In this case inside a forEach, I feel it's a little cleaner to stick the fail case at the top of the callback like:
if (!field) return
Resolves brave#13751 Auditors: Test Plan:
d57a897
to
773abcd
Compare
@ryanml I agree, your approach is cleaner. Code changed |
Codecov Report
@@ Coverage Diff @@
## master #13753 +/- ##
==========================================
- Coverage 56.63% 56.59% -0.04%
==========================================
Files 283 283
Lines 28848 28849 +1
Branches 4784 4785 +1
==========================================
- Hits 16338 16328 -10
- Misses 12510 12521 +11
|
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! 👍
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 🥇
Resolves #13751
Submitter Checklist:
git rebase -i
to squash commits (if needed).Test Plan:
LEDGER_VERBOSE=true
flagReviewer Checklist:
Tests