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

Commit 6c53177

Browse files
committed
Fix infinite loop
Fixes #326
1 parent 3fda7a8 commit 6c53177

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/angularjs-dropdown-multiselect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ directiveModule.directive('ngDropdownMultiselect', ['$filter', '$document', '$co
291291
var index = result.length - 4;
292292
if ($element[0].offsetWidth === 0)
293293
return result;
294-
while (textWidth(result) > widthLimit) {
294+
while (textWidth(result) > widthLimit && index > 0) {
295295
if (itemsText[itemsText.length - 1] !== "...") {
296296
itemsText.push('...');
297297
result = result + "...";

0 commit comments

Comments
 (0)