mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
Prevent extra loop iterations on buffer init
This commit is contained in:
parent
4baefeba68
commit
82c5042bad
@ -113,6 +113,10 @@ class WorldInfoBuffer {
|
|||||||
if (messages[depth]) {
|
if (messages[depth]) {
|
||||||
this.#depthBuffer[depth] = messages[depth].trim();
|
this.#depthBuffer[depth] = messages[depth].trim();
|
||||||
}
|
}
|
||||||
|
// break if last message is reached
|
||||||
|
if (depth === messages.length - 1) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user