ooyala/barkeep — pull request #321 by fkenji (2012-09-07 23:05:58+00:00)
Title: Comment box won't properly close after input is entered

When trying to add a new comment to a diff and pressing "Post your comment" the following javascript error will be thrown, without properly closing the box:

Uncaught ReferenceError: nil is not defined

This is due to an error in the method pluralize at commit.coffee / commit.js, where a default parameter is given as nil; that keyword nil is considered a regular javascript variable but won't be found in that context, resulting in the error above.
The comment itself is added successfully, though.

In order to fix this I just removed the default parameter value and also used a regular 'if' within that method since it seems ternary operators are not supported by coffeescript.