Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

[QUESTION] ambiguous method call inside "refreshItems" method #2239

Description

@the-liquid-metal

Hi.

I am exploring the Selectize codebase. I found this line inside refreshItems method:
this.addItem(this.items);
I also found this line inside addItem method:
value = hash_key(value);

since addItem method signature is function(value, silent), the value must be undefined, null, boolean, number, or string. If we feed addItem with array, value = hash_key(value); will produce incorrect value.

In addition to addItem, there is a corresponding method called addItems. There is no value = hash_key(value); statement (or anything similar) inside addItems. Moreover, addItem is called inside addItems: this.addItem(items[i], silent);.

Is it already correct (the this.addItem(this.items); statement inside refreshItems method),
or hidden bug (it should be this.addItems(this.items);)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions