repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 323e0732491a3a17ab3aa00438128d6737e6c476:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 323e0732491a3a17ab3aa00438128d6737e6c476
Author: James Baicoianu 
Date:   Wed Feb 26 07:23:14 2020 -0800

    Fix undefined starturl error

diff --git a/scripts/janusweb.js b/scripts/janusweb.js
index 31d7b4dd2a2076ddaae42b1b76dc5e0b0db9bd2f..
index ..8e42e5b557286d41c4fea70ba67b3cc4ceec423c 100644
--- 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-----