Fix one typo that wasted hours of debugging
This commit is contained in:
parent
d425663516
commit
1cf16d79be
@ -103,7 +103,7 @@ export class ChannelConfigurationElement extends LivechatElement {
|
|||||||
colName: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_LABEL),
|
colName: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_LABEL),
|
||||||
description: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_DESC2)
|
description: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_DESC2)
|
||||||
},
|
},
|
||||||
regex: {
|
regexp: {
|
||||||
colName: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_REGEXP_LABEL),
|
colName: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_REGEXP_LABEL),
|
||||||
description: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_REGEXP_DESC)
|
description: ptTr(LOC_LIVECHAT_CONFIGURATION_CHANNEL_FORBIDDEN_WORDS_REGEXP_DESC)
|
||||||
},
|
},
|
||||||
@ -152,7 +152,7 @@ export class ChannelConfigurationElement extends LivechatElement {
|
|||||||
default: [],
|
default: [],
|
||||||
separators: ['\n', '\t', ';']
|
separators: ['\n', '\t', ';']
|
||||||
},
|
},
|
||||||
regex: {
|
regexp: {
|
||||||
inputType: 'checkbox',
|
inputType: 'checkbox',
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
@ -61,8 +61,8 @@ export class ChannelDetailsService {
|
|||||||
if (fw.regexp) {
|
if (fw.regexp) {
|
||||||
if (v.trim() !== '') {
|
if (v.trim() !== '') {
|
||||||
try {
|
try {
|
||||||
const test = new RegExp(v)
|
// eslint-disable-next-line no-new
|
||||||
test.test(v)
|
new RegExp(v)
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
validationError.properties[`bot.forbiddenWords.${i}.entries`]
|
validationError.properties[`bot.forbiddenWords.${i}.entries`]
|
||||||
.push(ValidationErrorType.WrongFormat)
|
.push(ValidationErrorType.WrongFormat)
|
||||||
|
@ -594,8 +594,6 @@ export class DynamicTableFormElement extends LivechatElement {
|
|||||||
: target.value
|
: target.value
|
||||||
: undefined
|
: undefined
|
||||||
|
|
||||||
console.log(`value: ${JSON.stringify(value)}`)
|
|
||||||
|
|
||||||
if (value !== undefined) {
|
if (value !== undefined) {
|
||||||
for (const rowById of this._rowsById) {
|
for (const rowById of this._rowsById) {
|
||||||
if (rowById._id === rowId) {
|
if (rowById._id === rowId) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user