Skip to content

Commit 5ea5907

Browse files
authored
Merge pull request #3643 from Ajayneethikannan/Remove_redundant_code_background
[WIP] Remove redundant call to image function in p5.prototype.background
2 parents 726e5b1 + 372d8ed commit 5ea5907

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/color/setting.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,7 @@ require('./p5.Color');
174174
*/
175175

176176
p5.prototype.background = function() {
177-
if (arguments[0] instanceof p5.Image) {
178-
this.image(arguments[0], 0, 0, this.width, this.height);
179-
} else {
180-
this._renderer.background.apply(this._renderer, arguments);
181-
}
177+
this._renderer.background.apply(this._renderer, arguments);
182178
return this;
183179
};
184180

0 commit comments

Comments
 (0)