Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 67c6a8b

Browse files
committed
Revert "unbreak stack overflow which fires on tests due to mocked timers"
This reverts commit e69ea68.
1 parent eddc2af commit 67c6a8b

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/components/views/rooms/RoomList.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,7 @@ module.exports = React.createClass({
7474
this.setState(s);
7575

7676
// order of the sublists
77-
//this.listOrder = [];
78-
79-
// loop count to stop a stack overflow if the user keeps waggling the
80-
// mouse for >30s in a row, or if running under mocha
81-
this._delayedRefreshRoomListLoopCount = 0
77+
this.listOrder = [];
8278
},
8379

8480
componentDidMount: function() {
@@ -288,12 +284,10 @@ module.exports = React.createClass({
288284
// if the mouse has been moving over the RoomList in the last 500ms
289285
// then delay the refresh further to avoid bouncing around under the
290286
// cursor
291-
if (Date.now() - this._lastMouseOverTs > 500 || this._delayedRefreshRoomListLoopCount > 60) {
287+
if (Date.now() - this._lastMouseOverTs > 500) {
292288
this.refreshRoomList();
293-
this._delayedRefreshRoomListLoopCount = 0;
294289
}
295290
else {
296-
this._delayedRefreshRoomListLoopCount++;
297291
this._delayedRefreshRoomList();
298292
}
299293
}, 500),

0 commit comments

Comments
 (0)