Fixed: Bug where checkUserDefinedCode called even if stage didn't exist
This commit is contained in:
1 parent
2ef6136989
commit
5edc510c2c
1 file changed
+2
-1
+2
-1
@@ -1255,7 +1255,8 @@ exports.newSuperalgosBotModulesTradingStages = function (processIndex) {
|
||||
function checkUserDefinedCode(stage, status, when) {
|
||||
let tradingSystemStage = getTradingSystemStage(stage);
|
||||
|
||||
if (tradingSystemStage.userDefinedCode !== undefined) {
|
||||
if (tradingSystemStage !== undefined &&
|
||||
tradingSystemStage.userDefinedCode !== undefined) {
|
||||
if (status === 'Running' && when !== tradingSystemStage.userDefinedCode.config.whileAtStageWhenToRun) { return; }
|
||||
|
||||
switch(status) {
|
||||
|
||||
Reference in new issue
Block a user