mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-18 15:08:00 +01:00
Fixed lint issue about overwriting the argument
This commit is contained in:
parent
9a0ae3971b
commit
ea69049e21
1 changed files with 4 additions and 2 deletions
|
@ -44,11 +44,13 @@ function applySelectedValue(selection: string) {
|
||||||
if (!inputField) return;
|
if (!inputField) return;
|
||||||
|
|
||||||
if (!isSearchField(inputField)) {
|
if (!isSearchField(inputField)) {
|
||||||
|
let resultValue = selection;
|
||||||
|
|
||||||
if (originalTerm?.startsWith('-')) {
|
if (originalTerm?.startsWith('-')) {
|
||||||
selection = `-${selection}`;
|
resultValue = `-${selection}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputField.value = selection;
|
inputField.value = resultValue;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue