From 2cc2d08e234344c26e2fb50e9e07c67428263f27 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 24 Apr 2024 11:32:21 +0200 Subject: [PATCH] Fix test --- .../services/motion-diff.service/motion-diff.service.ts | 3 +-- .../modules/editor/components/editor/helpers/migrate-diff.ts | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts index b6d030b861..e8ee8da7b8 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts @@ -1342,12 +1342,11 @@ export class MotionDiffService { const ln = htmlNewEl.body.querySelector(`.os-line-number`); htmlNewEl.body.children[0].childNodes[0].before(ln); htmlOldEl.body.children[0].querySelector(`.os-line-number`).remove(); + htmlNew = htmlNewEl.body.innerHTML; } } diffDomTiptapMigration(htmlOldEl, htmlNewEl); - - htmlNew = htmlNewEl.body.innerHTML; htmlOld = htmlOldEl.body.innerHTML; // os-split-after should not be considered for detecting changes in paragraphs, so we strip it here diff --git a/client/src/app/ui/modules/editor/components/editor/helpers/migrate-diff.ts b/client/src/app/ui/modules/editor/components/editor/helpers/migrate-diff.ts index 96598b1d4b..3eacdfc7bf 100644 --- a/client/src/app/ui/modules/editor/components/editor/helpers/migrate-diff.ts +++ b/client/src/app/ui/modules/editor/components/editor/helpers/migrate-diff.ts @@ -27,6 +27,5 @@ function migrateListItems(doc: Document): void { export function diffDomTiptapMigration(docOld: Document, docNew: Document): void { if (docNew.querySelector(`li > p`)) { migrateListItems(docOld); - migrateListItems(docNew); } }