Merge pull request #2377 from webzwo0i/avoid-global-vairables

declare var outside of loop
pull/2378/head
John McLear 2014-12-16 16:18:01 +00:00
commit a2d22a5764
1 changed files with 2 additions and 1 deletions

View File

@ -152,7 +152,8 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
// apply msgQueue changeset.
if (msgQueue.length != 0) {
while (var msg = msgQueue.shift()) {
var msg;
while (msg = msgQueue.shift()) {
var newRev = msg.newRev;
rev=newRev;
if (msg.type == "ACCEPT_COMMIT")