refactor(editor): use lodash (#10657)

This commit is contained in:
Saul-Mirone
2025-03-06 09:00:00 +00:00
parent 8062893603
commit 7ae9daa6f6
46 changed files with 160 additions and 555 deletions
@@ -1,4 +1,3 @@
import { nToLast } from '@blocksuite/global/utils';
import type { Store } from '@blocksuite/store';
import type { GfxLocalElementModel } from '../gfx/index.js';
@@ -113,17 +112,17 @@ export function compare(
| GfxModel
| GfxGroupCompatibleInterface
| GfxLocalElementModel
| undefined = nToLast(aGroups, i);
| undefined = aGroups.at(-i);
let bGroup:
| GfxModel
| GfxGroupCompatibleInterface
| GfxLocalElementModel
| undefined = nToLast(bGroups, i);
| undefined = bGroups.at(-i);
while (aGroup === bGroup && aGroup) {
++i;
aGroup = nToLast(aGroups, i);
bGroup = nToLast(bGroups, i);
aGroup = aGroups.at(-i);
bGroup = bGroups.at(-i);
}
aGroup = aGroup ?? a;