mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
smashing errors caused by .forEach
This commit is contained in:
parent
b28bfe8e31
commit
f34f0585bb
4 changed files with 11 additions and 11 deletions
|
@ -1642,7 +1642,7 @@ function Ace2Inner(){
|
|||
|
||||
// update the representation
|
||||
p.mark("splice");
|
||||
forEach(splicesToDo, function(splice)
|
||||
splicesToDo.forEach(function(splice)
|
||||
{
|
||||
doIncorpLineSplice(splice[0], splice[1], splice[2], splice[3], splice[4]);
|
||||
});
|
||||
|
@ -2142,7 +2142,7 @@ function Ace2Inner(){
|
|||
return entry.domInfo;
|
||||
}), isTimeUp);
|
||||
|
||||
infoStructs.forEach(function(k)
|
||||
keysToDelete.forEach(function(k)
|
||||
{
|
||||
var n = doc.getElementById(k);
|
||||
n.parentNode.removeChild(n);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
// These parameters were global, now they are injected. A reference to the
|
||||
// Timeslider controller would probably be more appropriate.
|
||||
var forEach = require('./ace2_common').forEach;
|
||||
require('./ace2_common');
|
||||
|
||||
function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||
{
|
||||
|
@ -175,7 +175,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
$("#authorstable").empty();
|
||||
var numAnonymous = 0;
|
||||
var numNamed = 0;
|
||||
forEach(authors, function(author)
|
||||
authors.forEach(function(author)
|
||||
{
|
||||
if (author.name)
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
$("#timeslider").show();
|
||||
setSliderLength(clientVars.totalRevs);
|
||||
setSliderPosition(clientVars.revNum);
|
||||
forEach(clientVars.savedRevisions, function(revision)
|
||||
clientVars.savedRevisions.forEach(function(revision)
|
||||
{
|
||||
addSavedRevision(revision.revNum, revision);
|
||||
})
|
||||
|
|
|
@ -147,10 +147,11 @@ var chat = (function()
|
|||
}
|
||||
});
|
||||
|
||||
for(var i in clientVars.chatHistory)
|
||||
{
|
||||
this.addMessage(clientVars.chatHistory[i], false);
|
||||
}
|
||||
var that = this;
|
||||
$.each(clientVars.chatHistory, function(i, o){
|
||||
that.addMessage(o, false);
|
||||
})
|
||||
|
||||
$("#chatcounter").text(clientVars.chatHistory.length);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
var Changeset = require('./Changeset');
|
||||
var hooks = require('./pluginfw/hooks');
|
||||
var map = require('./ace2_common').map;
|
||||
|
||||
var linestylefilter = {};
|
||||
|
||||
|
@ -302,7 +301,7 @@ linestylefilter.getFilterStack = function(lineText, textAndClassFunc, browser)
|
|||
linestylefilter: linestylefilter,
|
||||
browser: browser
|
||||
});
|
||||
map(hookFilters, function(hookFilter)
|
||||
hookFilters.map(function(hookFilter)
|
||||
{
|
||||
func = hookFilter(lineText, func);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue