Type error in diff.coffee