repo: janusweb action: commit revision: path_from: revision_from: 323e0732491a3a17ab3aa00438128d6737e6c476: path_to: revision_to:
commit 323e0732491a3a17ab3aa00438128d6737e6c476 Author: James BaicoianuDate: Wed Feb 26 07:23:14 2020 -0800 Fix undefined starturl error diff --git a/scripts/janusweb.js b/scripts/janusweb.js
--- a/scripts/janusweb.js
+++ b/scripts/janusweb.js
@@ -268,14 +268,14 @@ elation.require([
if (this.networking && this.network) {
this.network.enable(player);
}
- if (!(this.autoload || starturl != this.properties.homepage)) {
+ if (!(this.autoload || this.getStartURL() != this.properties.homepage)) {
player.disable();
}
}
this.initRoom = function() {
var hashargs = elation.url();
- var starturl = hashargs['janus.url'] || this.properties.url || this.properties.homepage;
+ var starturl = this.getStartURL();
if (this.autoload || starturl != this.properties.homepage) {
this.load(starturl, true);
@@ -638,5 +638,8 @@ console.log('Register new SYSTEM tag type:', tagname, classobj, extendclass);
return asset;
}
+ this.getStartURL = function() {
+ return hashargs['janus.url'] || this.properties.url || this.properties.homepage;
+ }
}, elation.engine.things.generic);
});
-----END OF PAGE-----