Skip to content

Commit

Permalink
Minor refactoring of resource cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
andev0 committed Aug 21, 2024
1 parent dc0374f commit c5c9d47
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Sankey/SlotsGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,17 +127,11 @@ export class SlotsGroup extends EventTarget
{
if (this.type === "input")
{
return new SankeySlotMissing(this, this.groupSvg, {
id: this.resource.id,
amount: this.resource.amount
});
return new SankeySlotMissing(this, this.groupSvg, { ...this.resource });
}
else if (this.type === "output")
{
return new SankeySlotExceeding(this, this.groupSvg, {
id: this.resource.id,
amount: this.resource.amount
});
return new SankeySlotExceeding(this, this.groupSvg, { ...this.resource });
}
else
{
Expand Down

0 comments on commit c5c9d47

Please sign in to comment.