Skip to content

Commit 431e843

Browse files
committed
fix
1 parent 03ff776 commit 431e843

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/hot-ladybugs-dream.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'jotai-x': patch
3+
---
4+
5+
Fix: remove default infiniteRenderDetectionLimit

packages/jotai-x/src/createAtomStore.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export const createAtomStore = <
595595
deps
596596
) => {
597597
// If selector/equalityFn are not memoized, infinite loop will occur.
598-
if (process.env.NODE_ENV !== 'production') {
598+
if (process.env.NODE_ENV !== 'production' && infiniteRenderDetectionLimit) {
599599
renderCount += 1;
600600
if (renderCount > infiniteRenderDetectionLimit) {
601601
throw new Error(

0 commit comments

Comments
 (0)