Skip to content

Commit

Permalink
Fix wrong check, closes #47
Browse files Browse the repository at this point in the history
  • Loading branch information
marcofugaro committed Jan 30, 2023
1 parent b31543e commit 1a895de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ProjectedMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export default class ProjectedMaterial extends THREE.MeshPhysicalMaterial {
project(mesh) {
if (
!(Array.isArray(mesh.material)
? mesh.material.every((m) => m.isProjectedMaterial)
? mesh.material.some((m) => m.isProjectedMaterial)
: mesh.material.isProjectedMaterial)
) {
throw new Error(`The mesh material must be a ProjectedMaterial`)
Expand Down

0 comments on commit 1a895de

Please sign in to comment.