bugfix: safer if

This commit is contained in:
Leon van Kammen 2024-12-10 14:34:22 +00:00
parent ab69dac0ec
commit 186f2af440
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ xrf.frag.href = function(v, opts){
let click = mesh.userData.XRF.href.exec = (e) => {
if( !mesh.material || !mesh.material.visible ) return // ignore invisible nodes
if( !mesh.material || !(mesh.material && mesh.material.visible) ) return // ignore invisible nodes
// update our values to the latest value (might be edited)
let URI = xrf.URI.template( mesh.userData.href, xrf.URI.vars.__object )