 
   # Save given item entity, so we can dispatch events directly on it.
   key = "#{ctx.model.collection}$#{ctx.model.name}"
-  unless _.has entities, key then entities[key] = ctx
+  entities[key] = ctx  unless _.has entities, key
 
   switch type
     when EventType.Item.SELECTED

  # with internal representation.
  getShortcuts()
    .update @model.collection, @model.name,
      options: enabled: enabled


# Handles shortcuts#change events.

    .on 'end', (res) =>
      # A valid shortcut can't have less than 2 characters, so pass void to
      # callback.
      return cb()  if res.length < 2

      # This will eventually dispatch a shortcuts#change when appstorage is synced-up
      # with internal representation.
