Skip to content

Commit

Permalink
Don't set permissions to {}
Browse files Browse the repository at this point in the history
  • Loading branch information
seanh committed Oct 29, 2015
1 parent 46622e4 commit df645f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions h/static/scripts/directive/annotation.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ AnnotationController = [
# Set model.permissions to the default permissions for new annotations,
# _if_ model.permissions isn't already set.
setDefaultPermissions = ->
if not model.permissions?.read
if not model.permissions
model.permissions = permissions.default(model.group)

# Set the group of new annotations.
Expand Down Expand Up @@ -377,7 +377,7 @@ AnnotationController = [
# Watch the current user
# TODO: fire events instead since watchers are not free and auth is rare

This comment has been minimized.

Copy link
@nickstenning

nickstenning Oct 29, 2015

Contributor

If you're feeling keen you can now remove the TODO in this file thanks to @robertknight's addition of the USER_CHANGED event.

$scope.$watch (-> session.state.userid), (userid) ->
model.permissions ?= {}
model.permissions ?= null
model.user ?= userid

# Start editing brand new annotations immediately
Expand Down

0 comments on commit df645f4

Please sign in to comment.