Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/VirtualList.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ var VirtualList = function VirtualList(options) {
_this.refreshState = _this.refreshState.bind(_this);

// if requestAnimationFrame is available, use it to throttle refreshState
if (window && 'requestAnimationFrame' in window) {
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
_this.refreshState = (0, _throttleWithRAF2.default)(_this.refreshState);
}
return _this;
Expand Down
2 changes: 1 addition & 1 deletion src/VirtualList.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const VirtualList = (options, mapVirtualToProps = defaultMapToVirtualProps) => (
this.refreshState = this.refreshState.bind(this);

// if requestAnimationFrame is available, use it to throttle refreshState
if (window && 'requestAnimationFrame' in window) {
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
this.refreshState = throttleWithRAF(this.refreshState);
}
};
Expand Down