Don't instantiate resizeDetector at require-time
MODIFY
lib/project/list-view.js
lib/project/list-view.js
const etch = require('etch');
-const resizeDetector = require('element-resize-detector')({strategy: 'scroll'});
+const resizeDetector = require('element-resize-detector');
module.exports = class ListView {
constructor({items, heightForItem, itemComponent, className}) {
@@ -11,7 +11,7 @@ module.exports = class ListView {
this.previousClientHeight = 0
etch.initialize(this);
- resizeDetector.listenTo(this.element, () => etch.update(this));
+ resizeDetector({strategy: 'scroll'}).listenTo(this.element, () => etch.update(this));
this.element.addEventListener('scroll', () => etch.update(this));
}

MODIFY
lib/project/results-view.js
lib/project/results-view.js
@@ -2,7 +2,7 @@ const {Range, CompositeDisposable, Disposable} = require('atom');
const ResultView = require('./result-view');
const ListView = require('./list-view');
const etch = require('etch');
-const resizeDetector = require('element-resize-detector')({strategy: 'scroll'});
+const resizeDetector = require('element-resize-detector');
const reverseDirections = {
left: 'right',
@@ -32,7 +32,7 @@ class ResultsView {
});
visibilityChangedObserver.observe(this.element);
- resizeDetector.listenTo(this.element, this.invalidateItemHeights.bind(this));
+ resizeDetector({strategy: 'scroll'}).listenTo(this.element, this.invalidateItemHeights.bind(this));
this.element.addEventListener('mousedown', this.handleClick.bind(this));
this.subscriptions = new CompositeDisposable(

Don't instantiate resizeDetector at require-time