1
0
mirror of synced 2024-11-26 14:56:07 +03:00

dont error out when 'x' is removed really fast multiple times. fixes #745

This commit is contained in:
Igor Vaynberg 2013-01-30 22:38:58 -08:00
parent db39cdf584
commit 3f14f773f9

View File

@ -2169,6 +2169,12 @@ the specific language governing permissions and limitations under the Apache Lic
data = selected.data("select2-data");
if (!data) {
// prevent a race condition when the 'x' is clicked really fast repeatedly the event can be queued
// and invoked on an element already removed
return;
}
index = indexOf(this.id(data), val);
if (index >= 0) {