From 490a21ac67f4fdb8457d068af3b8321ce8a6e941 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Sat, 9 Nov 2013 18:50:24 +0100 Subject: [PATCH] Fixes array index issue in tagging JavaScript --- wcfsetup/install/files/js/WCF.Tagging.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Tagging.js b/wcfsetup/install/files/js/WCF.Tagging.js index d12233debf..828de7241a 100644 --- a/wcfsetup/install/files/js/WCF.Tagging.js +++ b/wcfsetup/install/files/js/WCF.Tagging.js @@ -133,7 +133,9 @@ WCF.Tagging.TagList = WCF.EditableItemList.extend({ _removeItem: function(objectID, label) { for (var $i = 0, $length = this._data.length; $i < $length; $i++) { if (this._data[$i] === label) { - delete this._data[$i]; + // don't use "delete" here since it doesn't reindex + // the array + this._data.splice($i, 1); return; } } @@ -168,4 +170,4 @@ WCF.Tagging.TagSearch = WCF.Search.Base.extend({ init: function(searchInput, callback, excludedSearchValues, commaSeperated) { this._super(searchInput, callback, excludedSearchValues, commaSeperated, false); } -}); \ No newline at end of file +}); -- 2.20.1