Skip to content

When minChars=0, code breaks #17028

Description

@softvar

If data-minChars="0" is defined and is set to 0, the following code get breaks

Object.defineProperty(Suggestion.prototype = Object.create(String.prototype), "length", {
	get: function() { return this.label.length; }
});

Error: TypeError: Cannot read property 'length' of undefined

there should have a safe check return this.label && this.label.length

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions