Skip to content

Commit

Permalink
Merge pull request #199 from farabi-deriv/farabi/bot-1887/trackjs-can…
Browse files Browse the repository at this point in the history
…not-read-properties-of-null-connection

Farabi/bot-1887/trackjs-cannot-read-properties-of-null-connection
  • Loading branch information
shafin-deriv authored Dec 16, 2024
2 parents 0e2ef6e + 984db7d commit ca74fd7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ window.Blockly.Blocks.trade_definition_market = {
// Reconnect self to trade definition block.
if (trade_definition_block) {
const connection = trade_definition_block.getLastConnectionInStatement('TRADE_OPTIONS');
connection.connect(this.previousConnection);
if (connection) {
connection.connect(this.previousConnection);
}
} else {
this.dispose();
}
Expand Down

0 comments on commit ca74fd7

Please sign in to comment.