mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-24 07:37:20 +02: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;
|
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) {
|
export function extractMessageBias(message) {
|
||||||
if (!message) {
|
if (!message) {
|
||||||
return null;
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user