mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 00:40:07 +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() {
|
checkScroll: function() {
|
||||||
var children = this.$('div.demonstrationText').children().toArray();
|
var children = this.$('div.demonstrationText').children().toArray();
|
||||||
var heights = children.map(function(child) { return child.clientHeight; });
|
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()) {
|
if (totalHeight < this.$('div.demonstrationText').height()) {
|
||||||
this.$('div.demonstrationText').addClass('noLongText');
|
this.$('div.demonstrationText').addClass('noLongText');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue