From 5c9e81053e98519564f5bd005d6c4da4d52d7fe5 Mon Sep 17 00:00:00 2001 From: Ted Liang Date: Wed, 10 Dec 2014 14:02:30 +1100 Subject: [PATCH] fix buildChangeDetails for MultiSelect --- select2.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/select2.js b/select2.js index 044bf1e8..e9460db1 100644 --- a/select2.js +++ b/select2.js @@ -3261,11 +3261,9 @@ the specific language governing permissions and limitations under the Apache Lic for (var j = 0; j < old.length; j++) { if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) { current.splice(i, 1); - if(i>0){ - i--; - } + i--; old.splice(j, 1); - j--; + break; } } }