mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 17:00:04 +02:00
Replace '_.map' to 'Array.prototype.map'
This commit is contained in:
parent
0134bf9870
commit
7af2db3da5
5 changed files with 11 additions and 11 deletions
|
@ -83,8 +83,8 @@ var GitDemonstrationView = ContainedBase.extend({
|
|||
},
|
||||
|
||||
checkScroll: function() {
|
||||
var children = this.$('div.demonstrationText').children();
|
||||
var heights = _.map(children, function(child) { return child.clientHeight; });
|
||||
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; });
|
||||
if (totalHeight < this.$('div.demonstrationText').height()) {
|
||||
this.$('div.demonstrationText').addClass('noLongText');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue