Skip to content

Commit

Permalink
fix: optional chaining for clearAll (#725)
Browse files Browse the repository at this point in the history
* fix: optional chaining for clearAll

* Update VirtualRenderer.ts

* Update VirtualRenderer.ts
  • Loading branch information
hirbod committed Jul 4, 2022
1 parent 21c6e1e commit 37d992c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/VirtualRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,9 @@ export default class VirtualRenderer {
const newRenderStack: RenderStack = {};
const keyToStableIdMap: { [key: string]: string } = {};

// Do not use recycle pool so that elements don't fly top to bottom or vice version
// Do not use recycle pool so that elements don't fly top to bottom or vice versa
// Doing this is expensive and can draw extra items
if (this._optimizeForAnimations) {
if (this._optimizeForAnimations && this._recyclePool) {
this._recyclePool.clearAll();
}

Expand Down

0 comments on commit 37d992c

Please sign in to comment.