Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
naelstrof committed Mar 19, 2016
1 parent de8df7a commit 369865b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion source/chemAPI.d
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ class ChemAPI : IChemAPI {
} else {
bname = j["id"].str;
}
html ~= `<edge color_s="` ~ color_s ~ `" color_d="` ~ color_d ~ `" result="` ~ j["result_amount"].toString() ~ `" weight="` ~ j["required_reagents"][str].toString() ~ `" hidden>"`~ bname ~ `","` ~ rname ~ `"</edge>`;
string resulta;
if ( j.object.keys.canFind( "result_amount" ) ) {
resulta = j["result_amount"].toString();
} else {
resulta = "1";
}
html ~= `<edge color_s="` ~ color_s ~ `" color_d="` ~ color_d ~ `" result="` ~ resulta ~ `" weight="` ~ j["required_reagents"][str].toString() ~ `" hidden>"`~ bname ~ `","` ~ rname ~ `"</edge>`;
html ~= generateEdges( str );
}
return html;
Expand Down

0 comments on commit 369865b

Please sign in to comment.