mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-23 21:16:06 +00:00
fix(app): avoid invalid continue in virtua patch
This commit is contained in:
parent
23320a199e
commit
ef30c3777a
1 changed files with 10 additions and 7 deletions
|
|
@ -57,18 +57,21 @@ index 029201a2c8..e3c4c0ca3a 100644
|
|||
@@ -1430,5 +1449,7 @@ const Virtualizer = (props) => {
|
||||
else {
|
||||
for (let [i, j] = range(); i <= j; i++) {
|
||||
+ if (i < 0 || i >= count)
|
||||
+ continue;
|
||||
items.push(props.data[i]);
|
||||
indexes.push(i);
|
||||
+ if (i >= 0 && i < count) {
|
||||
- items.push(props.data[i]);
|
||||
- indexes.push(i);
|
||||
+ items.push(props.data[i]);
|
||||
+ indexes.push(i);
|
||||
+ }
|
||||
}
|
||||
@@ -1579,6 +1600,8 @@ const VList = (props) => {
|
||||
});
|
||||
const items = [];
|
||||
for (let [i, j] = range(); i <= j; i++) {
|
||||
+ if (i < 0 || i >= count)
|
||||
+ continue;
|
||||
items.push(props.data[i]);
|
||||
+ if (i >= 0 && i < count) {
|
||||
- items.push(props.data[i]);
|
||||
+ items.push(props.data[i]);
|
||||
+ }
|
||||
}
|
||||
return items;
|
||||
diff --git a/lib/solid/Virtualizer.d.ts b/lib/solid/Virtualizer.d.ts
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue