Remove completely empty words.
This commit is contained in:
parent
40b607bdea
commit
cd959d9df8
1 changed files with 3 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
|||
import StyleSwitcher from '../style_switcher/style_switcher.vue'
|
||||
import { filter, trim } from 'lodash'
|
||||
|
||||
const settings = {
|
||||
data () {
|
||||
|
@ -23,7 +24,8 @@ const settings = {
|
|||
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
||||
},
|
||||
muteWordsString (value) {
|
||||
this.$store.dispatch('setOption', { name: 'muteWords', value: value.split('\n') })
|
||||
value = filter(value.split('\n'), (word) => trim(word).length > 0)
|
||||
this.$store.dispatch('setOption', { name: 'muteWords', value })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue