From f93234e442492ecd1288d70fdfc387fff157ea7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 23 May 2014 00:59:42 +0200 Subject: [PATCH] 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. --- extensions/window-list/extension.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 9a1c08d2..19bade7b 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -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); }