Ensure clearActiveBatches runs only when no batches are present

This commit is contained in:
2026-05-02 10:55:39 +02:00
parent c2f1e585b8
commit 7c5026bbad

View File

@@ -324,9 +324,8 @@ export class FoliageInstancedRenderer {
quality: this.quality quality: this.quality
}); });
this.clearActiveBatches();
if (batches.length === 0) { if (batches.length === 0) {
this.clearActiveBatches();
this.onRebuilt?.(); this.onRebuilt?.();
return; return;
} }