aframe: allow empty init

This commit is contained in:
Leon van Kammen 2023-06-27 09:42:49 +02:00
parent 5bc67f2b6b
commit 436ed610d1

View file

@ -3,7 +3,7 @@ window.AFRAME.registerComponent('xrf', {
},
init: function () {
if( !AFRAME.XRF ) this.initXRFragments()
if( this.data ){
if( typeof this.data == "string" ){
if( document.location.search || document.location.hash.length > 1 ){ // override url
this.data = `${document.location.search.substr(1)}${document.location.hash}`
}