Skip to content

AutoComplete Exception - Long List with the string matching [a-zA-Z][0-9] #237

@jestrjk

Description

@jestrjk

Using autocomplete with an array of about 200 choices, with a limit of 20 and using a filter string that matches one of the array choices at the end of the string with [a-zA-Z][0-9] pattern for example:

choices = [ 'some long string Q1', ...choices ]

when filtering by 'Q1', the result is an unhandled exception:

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'enabled' of undefined
at number (/home//aws-log-finder/alf/node_modules/enquirer/lib/types/array.js:276:19)
at handle (/home//aws-log-finder/alf/node_modules/enquirer/lib/types/array.js:307:18)
at /home//aws-log-finder/alf/node_modules/enquirer/lib/types/array.js:313:16
at new Promise ()-
at AutoComplete.number (/home//aws-log-finder/alf/node_modules/enquirer/lib/types/array.js:301:12)
at AutoComplete.keypress (/home//aws-log-finder/alf/node_modules/enquirer/lib/prompt.js:44:17)
at ReadStream.on (/home//aws-log-finder/alf/node_modules/enquirer/lib/keypress.js:205:26)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions