Skip to content

Commit

Permalink
Merge pull request #913 from caseywebdev/uid
Browse files Browse the repository at this point in the history
Fix #912 - reorder `id` assignment in `uniqueId`
  • Loading branch information
jashkenas committed Dec 21, 2012
2 parents 97f2b2d + 06ca5ea commit 2fa3a63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@
// Useful for temporary DOM ids.
var idCounter = 0;
_.uniqueId = function(prefix) {
var id = '' + (++idCounter);
var id = ++idCounter + '';
return prefix ? prefix + id : id;
};

Expand Down

0 comments on commit 2fa3a63

Please sign in to comment.