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:
Florian Müllner
2014-05-27 19:27:43 +02:00
parent f93234e442
commit db04866ca2
+2 -3
View File
@@ -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);
}