[gnome-shell] background: Fix a bug with empty animations
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] background: Fix a bug with empty animations
- Date: Thu, 14 Mar 2013 21:48:40 +0000 (UTC)
commit 8edd7ad32e83698ac5703851947eecffd5b14c2d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Mar 14 17:06:17 2013 -0400
background: Fix a bug with empty animations
Arrays always evaluate to true, even empty arrays,
so we need to check the length to make sure we have
no files.
https://bugzilla.gnome.org/show_bug.cgi?id=695882
js/ui/background.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index e86dd6e..bfe06a5 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -387,7 +387,7 @@ const Background = new Lang.Class({
this._animation.update(this._layoutManager.monitors[this._monitorIndex]);
let files = this._animation.keyFrameFiles;
- if (!files) {
+ if (files.length == 0) {
this._setLoaded();
this._queueUpdateAnimation();
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]