[gnome-shell-extensions] window-list: Use Infinity instead of special-casing 0
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] window-list: Use Infinity instead of special-casing 0
- Date: Tue, 27 May 2014 17:28:13 +0000 (UTC)
commit db04866ca28da1e104932942db3b696eea311153
Author: Florian Müllner <fmuellner gnome org>
Date: Tue May 27 19:25:41 2014 +0200
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 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 19bade7..e77dde9 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]