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:
Florian Müllner
2014-05-23 00:59:42 +02:00
parent fca578d184
commit f93234e442

View File

@@ -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);
}