Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/LeftSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function LeftSidebar() {

const handleSearch = useCallback(() => {
const id = parseInt(searchId, 10)
if (!isNaN(id) && id >= 1 && id <= 600) {
if (!Number.isNaN(id) && id >= 1 && id <= 600) {
searchAsteroidById(id)
}
}, [searchId, searchAsteroidById])
Expand Down
2 changes: 1 addition & 1 deletion src/components/RightSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export function RightSidebar() {

const handleApply = () => {
const parsedDv = parseFloat(maxDv)
const maxDvVal = isNaN(parsedDv) ? 0.35 : parsedDv
const maxDvVal = Number.isNaN(parsedDv) ? 0.35 : parsedDv

const parsedBurns = parseInt(maxBurns, 10)
const maxBurnsVal = isNaN(parsedBurns) ? 1 : parsedBurns
Expand Down
2 changes: 1 addition & 1 deletion src/lib/store.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export function AppProvider({
asteroidDataRef.current = data
if (focusedObjectId) {
const numId = parseInt(focusedObjectId.replace(/\D/g, ""), 10)
if (!isNaN(numId)) {
if (!Number.isNaN(numId)) {
const found = data.find((item) => item.id === numId)
if (found) {
setSelectedAsteroid(found)
Expand Down
Loading