From ccffef6759af02a733ecef5691b1899ce6d467d0 Mon Sep 17 00:00:00 2001 From: iamsivin Date: Thu, 30 Apr 2026 10:45:43 +0530 Subject: [PATCH] chore: Review fix --- app/javascript/dashboard/helper/emailQuoteExtractor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/dashboard/helper/emailQuoteExtractor.js b/app/javascript/dashboard/helper/emailQuoteExtractor.js index 325a4ea6f..7bf9b4e9d 100644 --- a/app/javascript/dashboard/helper/emailQuoteExtractor.js +++ b/app/javascript/dashboard/helper/emailQuoteExtractor.js @@ -163,13 +163,13 @@ const apply = root => { const bq = findEnclosingBlockquote(block, root); if (bq) return bq.remove(); const cutPoint = expandToWrapper(block, root); - if (cutPoint !== block) { + if (cutPoint !== block && cutPoint.parentElement !== root) { return cutBlockAtMarker( cutPoint, t => HEADER_LINE.test(t) || ATTRIBUTION.test(t) ); } - return block.remove(); + return cutPoint.remove(); }); // 5. Top-level RFC `>` / header tail. const start = findTopLevelTailStart(root);