repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 9e89b8482b46cea98ef0235adf07f6f308afd464:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 9e89b8482b46cea98ef0235adf07f6f308afd464
Author: James Baicoianu 
Date:   Wed Nov 1 11:50:27 2017 -0700

    Only call start/stop on children if they support it

diff --git a/scripts/janusbase.js b/scripts/janusbase.js
index 59f98161d263149cfe1d1c5175a1b6cabbd9f274..
index ..d5eecb0045dd77370d48ecb97dbe821874429142 100644
--- a/scripts/janusbase.js
+++ b/scripts/janusbase.js
@@ -388,12 +388,16 @@ elation.require(['engine.things.generic', 'utils.template'], function() {
         this.started = true;
       }
       for (var k in this.children) {
-        this.children[k].start();
+        if (this.children[k].start) {
+          this.children[k].start();
+        }
       }
     }    
     this.stop = function() {
       for (var k in this.children) {
-        this.children[k].stop();
+        if (this.children[k].stop) {
+          this.children[k].stop();
+        }
       }
       if (this.started) {
         elation.events.remove(this.room, 'janusweb_script_frame', this.handleFrameStart);

-----END OF PAGE-----