window-list: Use Infinity instead of special-casing 0
This should fix the problem addressed in the last commit without breaking 0 as stable sequence.
This commit is contained in:
@@ -59,9 +59,8 @@ function _onMenuStateChanged(menu, isOpen) {
|
||||
|
||||
function _getAppStableSequence(app) {
|
||||
return app.get_windows().reduce(function(prev, cur) {
|
||||
let seq = cur.get_stable_sequence();
|
||||
return prev ? Math.min(prev, seq) : seq;
|
||||
}, 0);
|
||||
return Math.min(prev, cur.get_stable_sequence());
|
||||
}, Infinity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user