Fix one typo that wasted hours of debugging

This commit is contained in:
Mehdi Benadel
2024-05-28 12:45:35 +02:00
parent d425663516
commit 1cf16d79be
3 changed files with 4 additions and 6 deletions

View File

@ -61,8 +61,8 @@ export class ChannelDetailsService {
if (fw.regexp) {
if (v.trim() !== '') {
try {
const test = new RegExp(v)
test.test(v)
// eslint-disable-next-line no-new
new RegExp(v)
} catch (_) {
validationError.properties[`bot.forbiddenWords.${i}.entries`]
.push(ValidationErrorType.WrongFormat)