Do not return null bias if empty string occurred.

This commit is contained in:
Cohee 2024-04-14 21:28:26 +03:00
parent 9cb777a4e9
commit 20b950b120
1 changed files with 6 additions and 1 deletions

View File

@ -2443,9 +2443,14 @@ function sendSystemMessage(type, text, extra = {}) {
is_send_press = false;
}
/**
* Extracts the contents of bias macros from a message.
* @param {string} message Message text
* @returns {string} Message bias extracted from the message (or an empty string if not found)
*/
export function extractMessageBias(message) {
if (!message) {
return null;
return '';
}
try {