Repository navigation
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3992 +/- ##
==========================================
- Coverage 97.52% 97.51% -0.02%
==========================================
Files 36 36
Lines 1456 1449 -7
Branches 466 463 -3
==========================================
- Hits 1420 1413 -7
Misses 36 36
🚀 New features to boost your workflow:
|
| } catch { | ||
| return null; | ||
| } | ||
| return props.row?.[props.column.key as keyof R] as React.ReactNode; |
There was a problem hiding this comment.
Added ?. to remove try/catch, which may improve performance.
When would this throw an error?
Maybe if it's a get accessor that throws an error? 🤔
There was a problem hiding this comment.
I think this should be okay. Otherwise we are silently ignoring errors
| } | ||
|
|
||
| type ClassValue = Maybe<string> | Record<string, boolean> | false; | ||
| type ClassValue = Maybe<string | false>; |
There was a problem hiding this comment.
Remove object support: fewer object allocations, -1 object type check, -1 loop, fewer object property access.
| } | ||
|
|
||
| return classname.trimStart(); | ||
| return classname.slice(1); |
There was a problem hiding this comment.
We know how much needs to be trimmed, and it works with empty strings as well, so we can skip the underlying trimStart() algo.
| } catch { | ||
| return null; | ||
| } | ||
| return props.row?.[props.column.key as keyof R] as React.ReactNode; |
There was a problem hiding this comment.
I think this should be okay. Otherwise we are silently ignoring errors
No description provided.