Skip to content

Commit

Permalink
CubeCamera fix ESLint no-prototype-builtins (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vatroslav Vrbanic committed Sep 12, 2022
1 parent f3e87a1 commit 4344a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/CubeCamera.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ Renders a `CubeMap` which can be used with **non-PBR** materials having an `.env
if (!bind_tex) {
let op: Mesh = bound_pos as Mesh
let op_mat: MaterialWithEnvMap = op.material as MaterialWithEnvMap
if (op_mat?.hasOwnProperty("envMap")) {
if (op_mat && Object.prototype.hasOwnProperty.call(op_mat, "envMap")) {
op_mat.envMap = camera.renderTarget.texture
}
}
Expand Down

0 comments on commit 4344a39

Please sign in to comment.