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
1 changed files with 3 additions and 1 deletions

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