refactor(core): replace array fns

This commit is contained in:
braks
2024-05-31 16:09:34 +02:00
committed by Braks
parent ac5e69b2c8
commit 02f3ca2ba0
7 changed files with 351 additions and 225 deletions
+4 -2
View File
@@ -133,9 +133,11 @@ export function applyChanges<
const elementIds = elements.map((el) => el.id)
for (const element of elements) {
const currentChanges = changes.filter((c) => (<any>c).id === element.id)
for (const currentChange of changes) {
if ((<any>currentChange).id !== element.id) {
continue
}
for (const currentChange of currentChanges) {
switch (currentChange.type) {
case 'select':
element.selected = currentChange.selected