From 0263d30b3771badc3db8b2d955e45422516e290d Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Tue, 16 Dec 2014 17:00:35 +0100 Subject: [PATCH] declare var outside of loop --- src/static/js/collab_client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/static/js/collab_client.js b/src/static/js/collab_client.js index f83e6d6ce..006b75f4d 100644 --- a/src/static/js/collab_client.js +++ b/src/static/js/collab_client.js @@ -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")