From dbdc884c960e3fe05d3dc3729fd923ca706a6a35 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 3 Dec 2013 15:45:53 -0500 Subject: [PATCH] background: Remove more bogus checks The content in these arrays can never be null... https://bugzilla.gnome.org/show_bug.cgi?id=719803 --- js/ui/background.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/ui/background.js b/js/ui/background.js index 1f9e49490..0a21bd239 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -50,11 +50,9 @@ const BackgroundCache = new Lang.Class({ effects: Meta.BackgroundEffects.NONE }); let content = null; + let candidateContent = null; for (let i = 0; i < this._patterns.length; i++) { - if (!this._patterns[i]) - continue; - if (this._patterns[i].get_shading() != params.shadingType) continue; @@ -88,7 +86,6 @@ const BackgroundCache = new Lang.Class({ } this._patterns.push(content); - return content; }, @@ -210,11 +207,9 @@ const BackgroundCache = new Lang.Class({ onFinished: null }); let content = null; + let candidateContent = null; for (let i = 0; i < this._images.length; i++) { - if (!this._images[i]) - continue; - if (this._images[i].get_style() != params.style) continue;