diff --git a/public/script.js b/public/script.js index bf706aa5f..ce035fcc5 100644 --- a/public/script.js +++ b/public/script.js @@ -3813,7 +3813,7 @@ function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncomplete } if (!power_user.allow_name2_display) { - mes = mes.replace(new RegExp(`(^|\n)${name2}:`, 'g'), "$1"); + getMessage = getMessage.replace(new RegExp(`(^|\n)${name2}:`, 'g'), "$1"); } if (isImpersonate) {