From db04866ca28da1e104932942db3b696eea311153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 27 May 2014 19:25:41 +0200 Subject: [PATCH] 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. --- extensions/window-list/extension.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js index 19bade7b..e77dde9d 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -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); }