Skip to content

Commit ce8629d

Browse files
committed
Fix an issue with System Designer extensions
1 parent b1f075d commit ce8629d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systems/classes/_Channel-class.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
"_id": "1e9021bd4e1bc6e",
9898
"component": "_Channel",
9999
"state": "$systemInstalled",
100-
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n // if all systems are installed\n systems = $db._System.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys.state() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db._System.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n\n master = $db._System.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n }\n }\n}",
100+
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n // if all systems are installed\n systems = $db._System.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys && sys.state && sys.state() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db._System.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n\n master = $db._System.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n\n if (system && system.state && system.state() === 'resolved') {\n system.state('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.state('active');\n }\n }.bind(this));\n }\n }\n}",
101101
"useCoreAPI": true,
102102
"core": true
103103
}

0 commit comments

Comments
 (0)