Skip to content

Commit

Permalink
Merge pull request #328 from HASEL-UZH/326-bug-in-exporter-comma-sepa…
Browse files Browse the repository at this point in the history
…rated-list-with-space

[#326] Filter empty obfuscation strings
  • Loading branch information
casaout authored Oct 21, 2024
2 parents cb1da52 + 0228462 commit e1b3743
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const emitObfuscateSampleData = async () => {
<div class="mb-2 mt-1 flex justify-center">
<label class="form-control w-full">
<input
v-model="obfuscationTermsInput"
v-model.trim="obfuscationTermsInput"
type="text"
placeholder="Enter, terms, here, ..."
class="input input-bordered w-full text-sm"
Expand Down
7 changes: 5 additions & 2 deletions src/electron/src/views/DataExportView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@ async function handleWindowActivityExportConfigChanged(newSelectedOption: DataEx
}
async function handleObfuscationTermsChanged(newObfuscationTerms: string) {
if (!newObfuscationTerms) {
if (!newObfuscationTerms || newObfuscationTerms.trim().length === 0) {
obfuscationTermsInput.value = [];
} else {
obfuscationTermsInput.value = newObfuscationTerms.split(',').map((s: string) => s.trim());
obfuscationTermsInput.value = newObfuscationTerms
.split(',')
.map((s: string) => s.trim())
.filter((s: string) => s.length > 0);
}
}
Expand Down

0 comments on commit e1b3743

Please sign in to comment.