Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

fix(errors): precise error messages on some bad usage #233

Merged
merged 1 commit into from
Jun 20, 2016

Conversation

vvo
Copy link
Contributor

@vvo vvo commented Jun 20, 2016

Warn when:

  • container provided with multiple DOM elements
  • container not an input

I don't think we need to support multiple DOM elements linked to a single instance of autocomplete.js, this looks like a edge case that is easily solvable user side (instantiate twice).

As for the underlying bug request (#229), it looks like the user do want to have multiple instances since those are different input purposes.

@algobot
Copy link
Contributor

algobot commented Jun 20, 2016

By analyzing the blame information on this pull request, we identified @redox and @bobylito to be potential reviewers

}

// if NodeList received, resolve to the first one
if (container instanceof NodeList) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to merge that with the first test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Done, let me know.

@vvo vvo force-pushed the fix/error-on-multiple-containers branch from f03f860 to dc8f0e1 Compare June 20, 2016 07:47
@bobylito
Copy link
Contributor

LGTM. Sorry I was not very awaken :D

@bobylito bobylito merged commit efa2678 into master Jun 20, 2016
@bobylito bobylito deleted the fix/error-on-multiple-containers branch June 20, 2016 07:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants