wrap code in dev block (#286)

This commit is contained in:
Nolan Lawson 2018-05-12 14:01:25 -07:00 committed by GitHub
parent 4e33a34fdb
commit fa4dd59f01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,9 @@ virtualListStore.computeForRealm('itemHeights', {})
virtualListStore.compute('rawVisibleItems',
['items', 'scrollTop', 'itemHeights', 'offsetHeight', 'showHeader', 'headerHeight', 'listOffset'],
(items, scrollTop, itemHeights, offsetHeight, showHeader, headerHeight, listOffset) => {
window.rawVisibleItemsComputed = (window.rawVisibleItemsComputed || 0) + 1
if (process.browser && process.env.NODE_ENV !== 'production') {
window.rawVisibleItemsComputed = (window.rawVisibleItemsComputed || 0) + 1
}
mark('compute visibleItems')
if (!items) {
return null