Skip to content

Undefined Error on origSettings.dropdown.enabled#1498

Description

@Brakebein

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

馃挜 Demo Page

https://jsbin.com/zozedaluna/edit?html,js,output

Explanation

In verion 4.37.1 you have introduced a bug at:

_s.dropdown.enabled = this.origSettings.dropdown.enabled;

When Tagify is instantiated without dropdown settings, and tagify.setReadonly(false) is called, then an error is thrown because this.origSettings.dropdown is undefined. (see jsbin above)

  • What is the expected behavior?
    Should run without undefined error. If dropdown setting is omitted, fall back to default setting or include check if dropdown setting is provided.

  • What is happening instead?
    Error is thrown.

  • What error message are you getting?

Uncaught TypeError: Cannot read properties of undefined (reading 'enabled')
    at N.setReadonly (tagify@4.38.0:34:55046)

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