fix radiateArray when focusing search with extra CMs around
This commit is contained in:
parent
74364b9d63
commit
4764f91453
|
@ -902,7 +902,9 @@ onDOMready().then(() => {
|
|||
|
||||
// produces [i, i+1, i-1, i+2, i-2, i+3, i-3, ...]
|
||||
function radiateArray(arr, focalIndex) {
|
||||
const result = [arr[focalIndex]];
|
||||
const focus = arr[focalIndex];
|
||||
if (!focus) return arr;
|
||||
const result = [focus];
|
||||
const len = arr.length;
|
||||
for (let i = 1; i < len; i++) {
|
||||
if (focalIndex + i < len) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user