We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34d7312 commit 060f1d8Copy full SHA for 060f1d8
1 file changed
src/components/OpenSourceStats.tsx
@@ -58,6 +58,9 @@ const NpmDownloadCounter = ({
58
npmData: Parameters<typeof useNpmDownloadCounter>[0]
59
}) => {
60
const { count, intervalMs } = useNpmDownloadCounter(npmData)
61
+ if (!Number.isFinite(count)) { // this returns true for NaN, Infinty / -Infinty, null, undefined
62
+ return '-'
63
+ }
64
return <StableCounter value={count} intervalMs={intervalMs} />
65
}
66
0 commit comments