Skip to content

Commit

Permalink
Release func in _.before and _.once
Browse files Browse the repository at this point in the history
  • Loading branch information
zertosh committed Oct 18, 2014
1 parent 23285b6 commit 631d076
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,8 @@
return function() {
if (--times > 0) {
memo = func.apply(this, arguments);
} else {
}
if (times <= 1) {
func = null;
}
return memo;
Expand Down

0 comments on commit 631d076

Please sign in to comment.