避免rootClassFilter r18ClassFilter数据为空时出错

This commit is contained in:
haiyangcui
2021-04-11 17:48:10 +02:00
parent 8772076d76
commit aba3472f2e

View File

@@ -290,8 +290,8 @@ export default {
},
saveFilterKeywords () {
// 移除空格,然后按逗号分开
this.setting.rootClassFilter = this.rootClassFilterKeywords.replace(/\s/g, '').split(',')
this.setting.r18ClassFilter = this.r18ClassFilterKeywords.replace(/\s/g, '').split(',')
this.setting.rootClassFilter = this.rootClassFilterKeywords?.replace(/\s/g, '').split(',')
this.setting.r18ClassFilter = this.r18ClassFilterKeywords?.replace(/\s/g, '').split(',')
this.setting.classFilter = []
this.setting.excludeRootClasses = this.excludeRootClasses
if (this.excludeRootClasses) {