We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5884e9e commit b91c51dCopy full SHA for b91c51d
index.ts
@@ -81,16 +81,20 @@ const useFlatJsonTree: (
81
},
82
[keyNext]: {
83
get(this: Record<string, unknown>) {
84
- return (this[keySiblings] as Record<string, unknown>[])[
85
- (this[keyIndex] as number) + 1
86
- ];
+ return (
+ (this[keySiblings] as Record<string, unknown>[])[
+ (this[keyIndex] as number) + 1
87
+ ] ?? null
88
+ );
89
90
91
[keyPrev]: {
92
- (this[keyIndex] as number) - 1
93
94
95
+ (this[keyIndex] as number) - 1
96
97
98
99
100
};
0 commit comments