@legendapp/list 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -579,7 +579,7 @@ var LegendListInner = React7.forwardRef(function LegendListInner2(props, forward
|
|
|
579
579
|
const addTotalSize = React7.useCallback((key, add, set) => {
|
|
580
580
|
const state = refState.current;
|
|
581
581
|
const index = key === null ? 0 : state.indexByKey.get(key);
|
|
582
|
-
const isAbove = index < (state.startNoBuffer || 0);
|
|
582
|
+
const isAbove = key !== null && index < (state.startNoBuffer || 0);
|
|
583
583
|
const prev = state.totalSize;
|
|
584
584
|
if (set) {
|
|
585
585
|
state.totalSize = add;
|
package/index.mjs
CHANGED
|
@@ -558,7 +558,7 @@ var LegendListInner = forwardRef(function LegendListInner2(props, forwardedRef)
|
|
|
558
558
|
const addTotalSize = useCallback((key, add, set) => {
|
|
559
559
|
const state = refState.current;
|
|
560
560
|
const index = key === null ? 0 : state.indexByKey.get(key);
|
|
561
|
-
const isAbove = index < (state.startNoBuffer || 0);
|
|
561
|
+
const isAbove = key !== null && index < (state.startNoBuffer || 0);
|
|
562
562
|
const prev = state.totalSize;
|
|
563
563
|
if (set) {
|
|
564
564
|
state.totalSize = add;
|