Fix to use more accurate types with custom isArray() and add lint (#5261)

* Fix to use more accurate types with custom isArray()

* Add lint against Array.isArray()
This commit is contained in:
Jonathan Tran
2025-02-05 09:01:45 -05:00
committed by GitHub
parent 336f4f27ba
commit f7ee248a26
14 changed files with 70 additions and 38 deletions

View File

@ -16,7 +16,7 @@ import { isDesktop } from 'lib/isDesktop'
import { useRef } from 'react'
import { CustomIcon } from 'components/CustomIcon'
import Tooltip from 'components/Tooltip'
import { toSync } from 'lib/utils'
import { isArray, toSync } from 'lib/utils'
import { reportRejection } from 'lib/trap'
import { CameraProjectionType } from 'wasm-lib/kcl/bindings/CameraProjectionType'
import { OnboardingStatus } from 'wasm-lib/kcl/bindings/OnboardingStatus'
@ -240,7 +240,7 @@ export function createSettings() {
if (
inputRef.current &&
inputRefVal &&
!Array.isArray(inputRefVal)
!isArray(inputRefVal)
) {
updateValue(inputRefVal)
} else {