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

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

@Xion

Description

@Xion

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions