         tree = tree.children[0]
         chainCount++
 
-    while tree.children.length == 1 and !@nodeHasComment(tree.id)
+    while tree.children.length == 1 and !@nodeIdHasComment(tree.id)
       tree = tree.children[0]
       chainCount++
 

        return entry.id


  nodeHasComment : (id) ->

    return @RENDER_COMMENTS and @comments.hasCommentWithNodeId(id)


    @ctx.beginPath()

    @ctx.fillStyle = @vgColor
    if @nodeIdHasComment(id)
      @ctx.fillStyle = @commentColor

    radius = @NODE_RADIUS
