Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit c6dcd05

Browse files
author
Brian Feister
committed
General cleanup, including some bad logic
1 parent ed88969 commit c6dcd05

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/select.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
*
5656
* jqLite find() is limited to lookups by tag name.
5757
* TODO This will change with future versions of AngularJS, to be removed when this happens
58-
5 *
58+
*
5959
* See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586
6060
* See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598
6161
*/
@@ -349,9 +349,7 @@
349349
if ( ctrl.taggingLabel === false ) {
350350
if ( ctrl.activeIndex < 0 ) {
351351
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search;
352-
if ( ! angular.equals( ctrl.items[0], item ) ) {
353-
item = item;
354-
} else {
352+
if ( angular.equals( ctrl.items[0], item ) ) {
355353
return;
356354
}
357355
} else {
@@ -366,7 +364,6 @@
366364
// for `item` if it is a detected duplicate
367365
if ( item === undefined ) return;
368366
// create new item on the fly
369-
if ( ctrl.taggingLabel && ctrl.taggingLabel.length > 0 ) {}
370367
item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : item.replace(ctrl.taggingLabel,'');
371368
}
372369
}

0 commit comments

Comments
 (0)