mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
Replace '_.reduce' to 'Array.prototype.reduce'
This commit is contained in:
parent
7af2db3da5
commit
e324e51587
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ var GitDemonstrationView = ContainedBase.extend({
|
|||
checkScroll: function() {
|
||||
var children = this.$('div.demonstrationText').children().toArray();
|
||||
var heights = children.map(function(child) { return child.clientHeight; });
|
||||
var totalHeight = _.reduce(heights, function(a, b) { return a + b; });
|
||||
var totalHeight = heights.reduce(function(a, b) { return a + b; });
|
||||
if (totalHeight < this.$('div.demonstrationText').height()) {
|
||||
this.$('div.demonstrationText').addClass('noLongText');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue