mirror of
https://github.com/hyperdxio/hyperdx
synced 2026-04-21 13:37:15 +00:00
## Summary
Fixes an operator-precedence bug in the "Copy entire row as JSON" button on the Search page. The `typeof value === 'string'` guard only applied to `value.startsWith('{')` but not `value.startsWith('[')`, so when a row contained a non-string value (number, boolean, etc.) the second `startsWith` call threw:
```
TypeError: s.startsWith is not a function
```
The fix moves the `typeof` check to guard both `startsWith` calls:
```diff
- (typeof value === 'string' && value.startsWith('{')) ||
- value.startsWith('[')
+ typeof value === 'string' &&
+ (value.startsWith('{') || value.startsWith('['))
```
### How to test locally or on Vercel
1. Open any Search page with results containing non-string column values (e.g. numeric or boolean fields).
2. Hover over a row and click the "Copy entire row as JSON" button (copy icon).
3. Verify the row is copied as valid JSON to the clipboard without a console error.
### References
- Related issue: HDX-4023
<div><a href="https://cursor.com/agents/bc-7aa1e5f4-ced5-4ee0-9585-4f473c5fca69"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-7aa1e5f4-ced5-4ee0-9585-4f473c5fca69"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <199161495+cursoragent@users.noreply.github.com>
|
||
|---|---|---|
| .. | ||
| add-alerts-page.md | ||
| add-cli-pattern-mining.md | ||
| add-drain-library.md | ||
| bump-otel-collector-to-0149.md | ||
| cli-app-url-migration.md | ||
| config.json | ||
| cool-pants-train.md | ||
| fix-copy-row-json-button.md | ||
| hdx-3908-validation-toast-dedupe.md | ||
| migrate-otel-collector-to-ocb.md | ||
| open-trace-in-browser.md | ||
| optimize-trace-waterfall.md | ||
| README.md | ||
| sharp-emus-reflect.md | ||
| short-badgers-applaud.md | ||
| upgrade-mantine-v9.md | ||
Changesets
Hello and welcome! This folder has been automatically generated by
@changesets/cli, a build tool that works with multi-package repos, or
single-package repos to help you version and publish your code. You can find the
full documentation for it
in our repository
We have a quick list of common questions to get you started engaging with this project in our documentation