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;