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

Empty server response may be interpreted as one "empty" result #96

Open
Xion opened this issue Aug 15, 2013 · 0 comments
Open

Empty server response may be interpreted as one "empty" result #96

Xion opened this issue Aug 15, 2013 · 0 comments

Comments

@Xion
Copy link

Xion commented Aug 15, 2013

When server returns empty (zero-length) response and there is no filter specified (filter: false), the autocomplete results are not completely empty length. Instead, the result array is of length one, and its sole element is:

{ data: [], value: "" }

that is, a completely 'empty' item.

I've identified the culprit as the usage of standard JavaScript String.split inside plainTextParser function. For empty strings, splitting with non-empty delimiter produces [""], i.e. an array of one empty string.

I can prepare pull request to fix the issue, but would like to inquire first whether it was an intended behavior or simply a bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant