window-list: Fix stupid thinko
Without special casing the start value of 0, we did not reduce to the minimum stable sequence of app windows, but 0.
This commit is contained in:
@@ -59,7 +59,8 @@ function _onMenuStateChanged(menu, isOpen) {
|
||||
|
||||
function _getAppStableSequence(app) {
|
||||
return app.get_windows().reduce(function(prev, cur) {
|
||||
return Math.min(prev, cur.get_stable_sequence());
|
||||
let seq = cur.get_stable_sequence();
|
||||
return prev ? Math.min(prev, seq) : seq;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user