profiler
profiler copied to clipboard
Null checks to handle Missing unified string optional values
Fixes: https://github.com/firefox-devtools/profiler/issues/5109
Adding null check in the if statement so that it enters the if-block only if value field is defined and not empty.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.40%. Comparing base (
7562508) to head (f5fac1b). Report is 137 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5125 +/- ##
=======================================
Coverage 88.40% 88.40%
=======================================
Files 305 305
Lines 27716 27716
Branches 7514 7514
=======================================
Hits 24501 24501
Misses 2981 2981
Partials 234 234
| Flag | Coverage Δ | |
|---|---|---|
? |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@fqueze @julienw
You can easily add some test code in this existing test: https://github.com/firefox-devtools/profiler/blob/756250859908d5fd480b09c0498b7f2cc97b178c/src/test/store/profile-view.test.js#L906 You could simply add a marker of the same "type" without any of the other properties, and otherwise don't touch anything else (because that marker wouldn't be found anyway). This would ensure that this doesn't throw in the process.
superceded by #5192