[gnome-shell/wip/message-tray: 35/35] grabHelper: Make sure to return not null when the stack contains fake grabs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/message-tray: 35/35] grabHelper: Make sure to return not null when the stack contains fake grabs
- Date: Sun, 19 Aug 2012 23:15:54 +0000 (UTC)
commit 4a9196a0bb21d92b43e45199edebfa6f94600bbd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Aug 19 19:12:02 2012 -0400
grabHelper: Make sure to return not null when the stack contains fake grabs
We did this if there's nothing in the grab stack, but didn't do this
when there's no real grabs in the grab stack.
js/ui/grabHelper.js | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/grabHelper.js b/js/ui/grabHelper.js
index 0a4ea97..40f0fdb 100644
--- a/js/ui/grabHelper.js
+++ b/js/ui/grabHelper.js
@@ -83,14 +83,11 @@ const GrabHelper = new Lang.Class({
},
get currentGrab() {
- if (!this._grabStack.length)
- return {};
-
let idx = this._grabStack.length - 1;
while (idx >= 0 && this._grabStack[idx].untracked)
idx--;
- return this._grabStack[idx];
+ return this._grabStack[idx] || {};
},
_findStackIndex: function(actor) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]