From d519d57de207d73685a0230b9449e1d491d56353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Thu, 23 Apr 2020 09:47:29 +0100 Subject: [PATCH] return early if start or stop are null --- src/VirtualList/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/VirtualList/index.js b/src/VirtualList/index.js index dbdbaf0..b09e470 100644 --- a/src/VirtualList/index.js +++ b/src/VirtualList/index.js @@ -143,6 +143,9 @@ export default class VirtualizedList { offset, overscanCount, }); + + if (start == null || stop == null) return + const fragment = document.createDocumentFragment(); for (let index = start; index <= stop; index++) {