-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
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);)?