From 8edd7ad32e83698ac5703851947eecffd5b14c2d Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Thu, 14 Mar 2013 17:06:17 -0400 Subject: [PATCH] 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 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/background.js b/js/ui/background.js index e86dd6e07..bfe06a526 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;