mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Do not return null bias if empty string occurred.
This commit is contained in:
parent
9cb777a4e9
commit
20b950b120
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user