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]) {
|
||||
this.#depthBuffer[depth] = messages[depth].trim();
|
||||
}
|
||||
// break if last message is reached
|
||||
if (depth === messages.length - 1) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue