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

Commit

Permalink
Make JSHint happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Feister committed Dec 8, 2014
1 parent fc93c66 commit bea7631
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@

$scope.$apply(function() {
var processed = false;
var tagged = false;

if(ctrl.multiple && KEY.isHorizontalMovement(key)){
processed = _handleMatchSelection(key);
Expand All @@ -616,17 +617,20 @@
if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) {
// make sure there is a new value to push via tagging
if ( ctrl.search.length > 0 ) {
$timeout(function() {
_searchInput.triggerHandler('tagged', ctrl.items);
var newItem = ctrl.search.replace(KEY.MAP[e.keyCode],'').trim();
if ( ctrl.tagging.fct ) {
newItem = ctrl.tagging.fct( newItem );
}
ctrl.select( newItem, true);
});
tagged = true;
}
}
}
if ( tagged ) {
$timeout(function() {
_searchInput.triggerHandler('tagged', ctrl.items);
var newItem = ctrl.search.replace(KEY.MAP[e.keyCode],'').trim();
if ( ctrl.tagging.fct ) {
newItem = ctrl.tagging.fct( newItem );
}
ctrl.select( newItem, true);
});
}
}
}

Expand Down Expand Up @@ -662,7 +666,7 @@
// taggingLabel === false bypasses all of this
if (ctrl.taggingLabel === false) return;

var items = angular.copy( ctrl.items )
var items = angular.copy( ctrl.items );
var stashArr = angular.copy( ctrl.items );
var newItem;
var item;
Expand Down

0 comments on commit bea7631

Please sign in to comment.