Skip to content

Commit

Permalink
Fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
StefansArya committed Mar 14, 2023
1 parent c5c0e53 commit 9c9e6d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ Blackprint.Engine = class Engine extends CustomEvent {
}

// ToDo: remove this after v1.0 released
if(options.structure.instance == null){
if(options.structure != null && options.structure.instance == null){
options.structure = this._jsonToNew(options.structure);
}

Expand Down
6 changes: 4 additions & 2 deletions src/nodes/Fn.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ class BPFunction extends CustomEvent { // <= _funcInstance

// This will be updated if the function sketch was modified
this.structure = options.structure || {
'BP/Fn/Input':[{i: 0, x: 400, y: 100}],
'BP/Fn/Output':[{i: 1, x: 600, y: 100}],
instance: {
'BP/Fn/Input':[{i: 0, x: 400, y: 100}],
'BP/Fn/Output':[{i: 1, x: 600, y: 100}],
}
};

let temp = this;
Expand Down

0 comments on commit 9c9e6d7

Please sign in to comment.