diff --git a/package.json b/package.json index f126d50..17caf27 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lint:fix": "eslint --fix" }, "peerDependencies": { - "react": "^18.0.0" + "react": ">=18.0.0" }, "dependencies": { "json-diff-kit": "^1.0.32", @@ -68,7 +68,7 @@ "@storybook/react": "8.6.0-alpha.0", "@storybook/react-vite": "8.6.0-alpha.0", "@types/node": "^22.14.1", - "@types/react": "^18.2.15", + "@types/react": ">=18.0.0", "@types/react-window": "^1.8.8", "eslint": "^9.33.0", "eslint-plugin-format": "^1.0.1", @@ -76,7 +76,7 @@ "eslint-plugin-react-refresh": "^0.4.20", "lint-staged": "^16.1.5", "postcss": "^8.5.1", - "react": "^18.2.0", + "react": ">=18.0.0", "rollup": "^3.26.3", "rollup-plugin-dts": "^5.3.0", "rollup-plugin-peer-deps-external": "^2.2.4", diff --git a/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx b/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx index 826bda5..3d0f197 100644 --- a/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx +++ b/src/components/DiffViewer/components/VirtualizedDiffViewer.tsx @@ -78,7 +78,7 @@ export const VirtualizedDiffViewer: React.FC = ({ miniMapWidth, }) => { const listRef = useRef(null); - const searchTimeoutRef = useRef(); + const searchTimeoutRef = useRef(undefined); const [scrollTop, setScrollTop] = useState(0); const [segments, setSegments] = useState([]);