Removed some redundant code in render-graph.js