Skip to content

Commit ca74fd7

Browse files
authored
Merge pull request #199 from farabi-deriv/farabi/bot-1887/trackjs-cannot-read-properties-of-null-connection
Farabi/bot-1887/trackjs-cannot-read-properties-of-null-connection
2 parents 0e2ef6e + 984db7d commit ca74fd7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/external/bot-skeleton/scratch/blocks/Binary/Trade Definition/trade_definition_market.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ window.Blockly.Blocks.trade_definition_market = {
116116
// Reconnect self to trade definition block.
117117
if (trade_definition_block) {
118118
const connection = trade_definition_block.getLastConnectionInStatement('TRADE_OPTIONS');
119-
connection.connect(this.previousConnection);
119+
if (connection) {
120+
connection.connect(this.previousConnection);
121+
}
120122
} else {
121123
this.dispose();
122124
}

0 commit comments

Comments
 (0)