Fix pattern checking on /replace
| @@ -2079,8 +2079,9 @@ export function initDefaultSlashCommands() { | ||
| 2079 | 2079 | name: 'replace', |
| 2080 | 2080 | aliases: ['re'], |
| 2081 | 2081 | callback: (async ({ mode = 'literal', pattern, replacer = '' }, text) => { |
| 2082 | 2082 | if (!pattern === '') { |
| 2083 | 2083 | throw new Error('Argument of \'pattern=\' cannot be empty'); |
| 2084 | + } | |
| 2084 | 2085 | switch (mode) { |
| 2085 | 2086 | case 'literal': |
| 2086 | 2087 | return text.replaceAll(pattern, replacer); |