diff --git a/www/code/main.js b/www/code/main.js index 524726c8a..0f8da6c82 100644 --- a/www/code/main.js +++ b/www/code/main.js @@ -35,8 +35,7 @@ define([ }; $(function () { - var userName = Crypto.rand64(8), - toolbar; + var toolbar; var secret = Cryptpad.getSecrets(); @@ -129,10 +128,9 @@ define([ var config = { //initialState: Messages.codeInitialState, - userName: userName, + initialState: '{}', websocketURL: Config.websocketURL, channel: secret.channel, - //cryptKey: key, crypto: Crypto.createEncryptor(secret.key), setMyID: setMyID, transformFunction: JsonOT.validate @@ -549,6 +547,7 @@ define([ initializing = false; //Cryptpad.log("Your document is ready"); + onLocal(); // push local state to avoid parse errors later. getLastName(function (err, lastName) { if (err) { console.log("Could not get previous name");