Page MenuHomePhabricator

[native] Use `Array.some(...)` in `uploadInProgress`
ClosedPublic

Authored by abosh on Aug 19 2022, 2:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 10:12 AM
Unknown Object (File)
Mon, Dec 16, 5:45 AM
Unknown Object (File)
Sun, Dec 15, 10:39 PM
Unknown Object (File)
Sun, Dec 15, 10:39 PM
Unknown Object (File)
Sun, Dec 15, 10:39 PM
Unknown Object (File)
Mon, Dec 9, 4:41 PM
Unknown Object (File)
Thu, Dec 5, 2:34 PM
Unknown Object (File)
Wed, Dec 4, 4:53 AM
Subscribers

Details

Summary

Depends on D4890. Minor change that avoids another level of indentation/for loop by using Array.some(...).

Test Plan

Flow, close reading.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
native/input/input-state-container.react.js
376–378 ↗(On Diff #15798)

Using Object.values might simplify it even further

This revision is now accepted and ready to land.Aug 25 2022, 2:26 AM
abosh added inline comments.
native/input/input-state-container.react.js
376–378 ↗(On Diff #15798)

image.png (472×2 px, 197 KB)

Unfortunately Flow complains, but it is much cleaner!

native/input/input-state-container.react.js
376–378 ↗(On Diff #15798)

You can use values in lib/utils/objects.js

This revision was automatically updated to reflect the committed changes.
abosh marked an inline comment as done.