소스 검색

fix buildChangeDetails for MultiSelect

Ted Liang 10 년 전
부모
커밋
5c9e81053e
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      select2.js

+ 2 - 4
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++) {
                 for (var j = 0; j < old.length; j++) {
                     if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
                     if (equal(this.opts.id(current[i]), this.opts.id(old[j]))) {
                         current.splice(i, 1);
                         current.splice(i, 1);
-                        if(i>0){
-                            i--;
-                        }
+                        i--;
                         old.splice(j, 1);
                         old.splice(j, 1);
-                        j--;
+                        break;
                     }
                     }
                 }
                 }
             }
             }