Skip to content

Commit

Permalink
Manually merged 386c3efe729 to resolve conflicts.
Browse files Browse the repository at this point in the history
Don't add tokens if limit has been reached.
  • Loading branch information
Georg Schmidl authored and arrbee committed Jul 29, 2011
1 parent d90b91f commit 39e7d11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jquery.tokeninput.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,8 +647,10 @@ $.TokenList = function (input, url_or_data_or_function, settings) {
}

// Insert the new tokens
insert_token(li_data);
checkTokenLimit();
if(settings.tokenLimit == null || token_count < settings.tokenLimit) {
insert_token(li_data);
checkTokenLimit();
}

// Clear input box
input_box.val("");
Expand Down

0 comments on commit 39e7d11

Please sign in to comment.