Skip to content

Commit c174c4c

Browse files
changed typo && to ||
1 parent f57b625 commit c174c4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webgl/p5.Shader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1327,7 +1327,7 @@ p5.Shader = class {
13271327
break;
13281328
case gl.SAMPLER_2D:
13291329
if (typeof data == 'number') {
1330-
if (data < gl.TEXTURE0 && data > gl.TEXTURE31 && data === Math.ceil(data)) {
1330+
if (data < gl.TEXTURE0 || data > gl.TEXTURE31 || data === Math.ceil(data)) {
13311331
console.log('🌸 p5.js says: You\'re trying to use a number as the data for a texture. Please use a texture.');
13321332
return this;
13331333
}

0 commit comments

Comments
 (0)