diff --git a/packages/react-json-tree/examples/src/App.tsx b/packages/react-json-tree/examples/src/App.tsx index 53576e9e..83ad4d07 100644 --- a/packages/react-json-tree/examples/src/App.tsx +++ b/packages/react-json-tree/examples/src/App.tsx @@ -28,7 +28,8 @@ const getValueLabelStyle: StylingValue = ({ style }, nodeType, keyPath) => ({ style: { ...style, color: - !Number.isNaN(keyPath[0]) && !(parseInt(keyPath, 10) % 2) + !Number.isNaN((keyPath as unknown[])[0]) && + !(parseInt(keyPath as string, 10) % 2) ? '#33F' : style!.color, },