fix(browser): Replace Array.at() with slice() for broader compatibility - #4111
sentry[bot] wants to merge 1 commit into
Conversation
|
Seer wants to keep iterating on this pull request to get CI passing, but the Sentry GitHub App installation is missing permissions it needs to read the failing checks and push a fix. Review and accept the updated permissions to let Seer continue: https://github.com/organizations/codecov/settings/installations/86101127/permissions/update |
Bundle ReportChanges will increase total bundle size by 8 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: gazebo-production-esmAssets Changed:
Files in
view changes for bundle: gazebo-production-systemAssets Changed:
Files in
|
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #4111 +/- ##
==========================================
+ Coverage 98.77% 98.78% +0.01%
==========================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
==========================================
+ Hits 14961 14963 +2
+ Misses 179 177 -2
Partials 7 7
... and 1 file with indirect coverage changes
Continue to review full report in Codecov by Sentry.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4111 +/- ##
==========================================
+ Coverage 98.77% 98.78% +0.01%
==========================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
==========================================
+ Hits 14961 14963 +2
+ Misses 179 177 -2
Partials 7 7
... and 1 file with indirect coverage changes
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 #4111 +/- ##
==========================================
+ Coverage 98.77% 98.78% +0.01%
==========================================
Files 823 823
Lines 15147 15147
Branches 4387 4387
==========================================
+ Hits 14961 14963 +2
+ Misses 179 177 -2
Partials 7 7
... and 1 file with indirect coverage changes
Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Description
This PR addresses GAZEBO-16ZW by replacing
Array.prototype.at(-1)withArray.prototype.slice(-1)[0]ingetFilenameFromPathandgetFileExtension. TheTypeError: e.split(...).at is not a functionerror was occurring in older or non-standard browser environments becauseArray.prototype.atis an ES2022 feature not universally supported. This change ensures that these functions work correctly across a wider range of client engines, preventing the RawFileViewer ErrorBoundary from being triggered on blob file pages.Code Example
Before:
someArray.at(-1)After:
someArray.slice(-1)[0]Notable Changes
Array.prototype.at(-1)withArray.prototype.slice(-1)[0]ingetFilenameFromPathandgetFileExtensionwithinsrc/shared/utils/url.ts.Array.prototype.at.RawFileViewer ErrorBoundaryfrom being triggered on blob file pages due toTypeError: e.split(...).at is not a function.Screenshots
Link to Sample Entry
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-16ZW
This PR was automatically generated by Sentry. You can adjust this setting at any time.