Fix pattern checking on /replace

5ddc8f17a0958e5bd8bc42475955047ed729dd2b

Crow <bismuthglass@protonmail.com>

1 files changed, +2 -1Showing whitespace changes
public/scripts/slash-commands.js+2 -1
@@ -2079,8 +2079,9 @@ export function initDefaultSlashCommands() {
20792079 name: 'replace',
20802080 aliases: ['re'],
20812081 callback: (async ({ mode = 'literal', pattern, replacer = '' }, text) => {
20822082 if (!pattern === '') {
20832083 throw new Error('Argument of \'pattern=\' cannot be empty');
2084+ }
20842085 switch (mode) {
20852086 case 'literal':
20862087 return text.replaceAll(pattern, replacer);