mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
hotfix on emtpy content: Was unable to open a certain chat without this
This commit is contained in:
@ -1183,6 +1183,10 @@ function scrollChatToBottom() {
|
|||||||
function substituteParams(content, _name1, _name2) {
|
function substituteParams(content, _name1, _name2) {
|
||||||
_name1 = _name1 ?? name1;
|
_name1 = _name1 ?? name1;
|
||||||
_name2 = _name2 ?? name2;
|
_name2 = _name2 ?? name2;
|
||||||
|
if (!content) {
|
||||||
|
console.warn("No content on substituteParams")
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
content = content.replace(/{{user}}/gi, _name1);
|
content = content.replace(/{{user}}/gi, _name1);
|
||||||
content = content.replace(/{{char}}/gi, _name2);
|
content = content.replace(/{{char}}/gi, _name2);
|
||||||
|
Reference in New Issue
Block a user