Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 108 forks source link

Occasional error if list is empty when attempting to render template #54

Open mizzao opened 10 years ago

mizzao commented 10 years ago

image

Doesn't happen often and doesn't seem to break anything as the template is re-rendered later.

Scalahansolo commented 9 years ago

I just ran into this bug...

Exception from Tracker recompute function: Cannot read property 'limit' of null

Scalahansolo commented 9 years ago

I have been using this package for a while and have been using it like the following.

Template.editOrg.helpers =

  getCurrentComp: ->
    return Meteor.user().profile.organization

  orgAutoComplete: ->
    position: "bottom"
    limit: 8
    rules: [
      {
        collection: Organizations
        field: "name"
        template: Template.orgAutoComplete
      }
    ]

Basically I have been using it as a template helper and not as a setting as you have written up. For some odd reason, now when I use it as a helper I get the above error, but when I change it to a settings, it works fine other than the warning I get about settings being deprecated.