bugfix: separate query vs hash URI overrides
This commit is contained in:
parent
755682b6e1
commit
b2b8bfd03b
1 changed files with 5 additions and 2 deletions
|
|
@ -21,8 +21,11 @@ window.AFRAME.registerComponent('xrf', {
|
|||
let searchIsUri = document.location.search &&
|
||||
!document.location.search.match(/=/) &&
|
||||
document.location.search.match("/")
|
||||
if( searchIsUri || document.location.hash.length > 1 ){ // override url
|
||||
this.data = `${document.location.search.substr(1)}${document.location.hash}`
|
||||
if( searchIsUri ){ // override url
|
||||
this.data = `${document.location.search.substr(1)}`
|
||||
}
|
||||
if( document.location.hash.length > 1 ){
|
||||
this.data = this.data.replace(/#.*/,'') + document.location.hash
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue