fix(ownerpage): Handle undefined owner data in useOwnerPageData hook - #4075
fix(ownerpage): Handle undefined owner data in useOwnerPageData hook#4075sentry[bot] wants to merge 1 commit into
Conversation
Bundle ReportChanges will increase total bundle size by 25 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-production-systemAssets Changed:
Files in
view changes for bundle: gazebo-production-esmAssets Changed:
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4075 +/- ##
=======================================
Coverage 98.76% 98.76%
=======================================
Files 822 822
Lines 15092 15092
Branches 4351 4360 +9
=======================================
Hits 14906 14906
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #4075 +/- ##
=======================================
Coverage 98.76% 98.76%
=======================================
Files 822 822
Lines 15092 15092
Branches 4359 4352 -7
=======================================
Hits 14906 14906
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4075 +/- ##
=======================================
Coverage 98.76% 98.76%
=======================================
Files 822 822
Lines 15092 15092
Branches 4351 4360 +9
=======================================
Hits 14906 14906
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
|
✅ Deploy preview for gazebo ready!Previews expire after 1 month automatically.
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4075 +/- ##
=======================================
Coverage 98.76% 98.76%
=======================================
Files 822 822
Lines 15092 15092
Branches 4359 4352 -7
=======================================
Hits 14906 14906
Misses 179 179
Partials 7 7
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Description
This PR addresses GAZEBO-181W by modifying the
useOwnerPageDatahook insrc/pages/OwnerPage/hooks/useOwnerPageData.js.Previously, the
queryFncould returnundefinedifres?.data?.ownerwas not present, which causes TanStack Query to crash as it explicitly disallowsundefinedas a query result.This change reintroduces the nullish coalescing operator (
?? null) to ensure thatnullis returned instead ofundefinedwhen owner data is missing. This restores the intended behavior and prevents the application from crashing, aligning with a previous fix from PR 4023.Code Example
Notable Changes
src/pages/OwnerPage/hooks/useOwnerPageData.js.?? null) in thequeryFnofuseOwnerPageData.nullis returned instead ofundefinedwhen owner data is missing, preventing TanStack Query from crashing.Screenshots
N/A
Link to Sample Entry
N/A
Legal Boilerplate
Look, I get it. The entity doing business as "Codecov" is owned by Harness, Inc. In 2026 Harness acquired Codecov and as a result Harness is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Harness can use, modify, copy, and redistribute my contributions, under Harness's choice of terms.
Fixes GAZEBO-181W