Skip to content

Commit 669d3a7

Browse files
committedOct 23, 2008
Document a return that breaks a loop rather than return a value.
1 parent ec4873d commit 669d3a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎jquery.truncator.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
var truncatedChild;
5959
node.contents().each(function() {
6060
var remaining_length = max_length - new_node.text().length;
61-
if (remaining_length == 0) return;
61+
if (remaining_length == 0) return; // breaks the loop
6262
truncatedChild = recursivelyTruncate(this, remaining_length);
6363
if (truncatedChild) new_node.append(truncatedChild);
6464
});

0 commit comments

Comments
 (0)