From 7276c47f6f030362570a4efc149fc1c9989f473e Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 8 Jul 2020 17:18:05 -0400 Subject: [PATCH] don't mutate the fallback search terms Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts index f17309fce3..778ba1bb8f 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/search/acq-search-form.component.ts @@ -111,7 +111,8 @@ export class AcqSearchFormComponent implements OnInit, AfterViewInit, OnChanges this.searchConjunction = defaultSearch.conjunction; } else if (this.fallbackSearchTerms.length) { this.searchTerms.length = 0; - this.fallbackSearchTerms.forEach(term => this.searchTerms.push(term)); + JSON.parse(JSON.stringify(this.fallbackSearchTerms)) + .forEach(term => this.searchTerms.push(term)); // need a copy } else { this.addSearchTerm(); } -- 2.11.0