From f647aba153711255d1450e2fc0189af329fc3241 Mon Sep 17 00:00:00 2001 From: itdominator <1itdominator@gmail.com> Date: Sat, 5 Jul 2025 00:14:04 -0500 Subject: [PATCH] Fixing search-replace replace to allow empty string insert --- src/app/editor/search-replace/search-replace.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/editor/search-replace/search-replace.component.ts b/src/app/editor/search-replace/search-replace.component.ts index 1454f28..f318bbe 100644 --- a/src/app/editor/search-replace/search-replace.component.ts +++ b/src/app/editor/search-replace/search-replace.component.ts @@ -209,7 +209,7 @@ export class SearchReplaceComponent { let fromStr = this.findEntryElm.nativeElement.value; let toStr = this.replaceEntryElm.nativeElement.value; - if (!fromStr || !toStr) return; + if (!fromStr) return; let totalCount = this.editor.replace(toStr, fromStr, { backwards: this.isBackwards, @@ -228,7 +228,7 @@ export class SearchReplaceComponent { let fromStr = this.findEntryElm.nativeElement.value; let toStr = this.replaceEntryElm.nativeElement.value; - if (!fromStr || !toStr) return; + if (!fromStr) return; let totalCount = this.editor.replaceAll(toStr, fromStr, { backwards: this.isBackwards,