Skip to content

Commit b2668d0

Browse files
authored
Merge pull request #506 from EarthyScience/jp/bigint-meta
fixed hard crash from bigint attributes. added env_check for pinger
2 parents d5fe40b + 6f4a727 commit b2668d0

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/components/LandingHome.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export function LandingHome() {
8181
}, [currentStore, setZMeta, setVariables, setTitleDescription])
8282

8383
useEffect(()=>{
84-
sendPing()
84+
if (process.env.NODE_ENV !== "development") {
85+
sendPing()
86+
}
8587
},[])
8688

8789
return (

src/components/ui/MetaData.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export function renderAttributes(
5454
<div className="font-mono whitespace-pre-wrap break-words md:col-start-2 md:row-start-auto pl-4 md:pl-2"
5555
style={{ overflowWrap: 'anywhere' }}
5656
>
57-
{typeof value === 'object' ? JSON.stringify(value) : String(value)}
57+
{typeof value === 'object'
58+
? JSON.stringify(value, (_key, val) =>
59+
typeof val === 'bigint' ? parseInt(val.toString()) : val)
60+
: String(value)
61+
}
5862
</div>
5963
</React.Fragment>
6064
);

0 commit comments

Comments
 (0)