summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/SkPatternTest.vue
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-05-13 22:58:24 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-05-13 22:58:24 -0400
commit8348a36f24fcc9b01584a8fb2d895db95de82283 (patch)
tree01becf8e3eb2716db689274548a5e236bf802d3a /packages/frontend/src/components/SkPatternTest.vue
parentfactor out shared word mute logic (diff)
downloadsharkey-8348a36f24fcc9b01584a8fb2d895db95de82283.tar.gz
sharkey-8348a36f24fcc9b01584a8fb2d895db95de82283.tar.bz2
sharkey-8348a36f24fcc9b01584a8fb2d895db95de82283.zip
cleanup, simplify, and merge duplicate word mute implementations
Diffstat (limited to 'packages/frontend/src/components/SkPatternTest.vue')
-rw-r--r--packages/frontend/src/components/SkPatternTest.vue4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/components/SkPatternTest.vue b/packages/frontend/src/components/SkPatternTest.vue
index 2ed2b3fdc3..fe82c1df2f 100644
--- a/packages/frontend/src/components/SkPatternTest.vue
+++ b/packages/frontend/src/components/SkPatternTest.vue
@@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts.wordMuteTestDescription }}</template>
</MkTextarea>
<div><MkButton :disabled="!testWords" @click="testWordMutes">{{ i18n.ts.wordMuteTestTest }}</MkButton></div>
- <div v-if="testMatches == null">{{ i18n.ts.wordMuteTestNoResults}}</div>
+ <div v-if="testMatches == null">{{ i18n.ts.wordMuteTestNoResults }}</div>
<div v-else-if="testMatches === ''">{{ i18n.ts.wordMuteTestNoMatch }}</div>
<div v-else>{{ i18n.tsx.wordMuteTestMatch({ words: testMatches }) }}</div>
</div>
@@ -44,7 +44,7 @@ function testWordMutes() {
try {
const mutes = parseMutes(props.mutedWords);
const matches = checkWordMute(testWords.value, null, mutes);
- testMatches.value = matches ? matches.flat(2).join(', ') : '';
+ testMatches.value = matches ? matches.join(', ') : '';
} catch {
// Error is displayed by above function
testMatches.value = null;