collab_client: Delete unused options argument

This commit is contained in:
Richard Hansen 2021-04-01 01:25:40 -04:00
parent 8ef84e5350
commit 0c95f2e65e
2 changed files with 3 additions and 4 deletions

View file

@ -46,7 +46,7 @@ class Gate extends Promise {
/** Call this when the document is ready, and a new Ace2Editor() has been created and inited. /** Call this when the document is ready, and a new Ace2Editor() has been created and inited.
ACE's ready callback does not need to have fired yet. ACE's ready callback does not need to have fired yet.
"serverVars" are from calling doc.getCollabClientVars() on the server. */ "serverVars" are from calling doc.getCollabClientVars() on the server. */
const getCollabClient = (ace2editor, serverVars, initialUserInfo, options, _pad) => { const getCollabClient = (ace2editor, serverVars, initialUserInfo, _pad) => {
const editor = ace2editor; const editor = ace2editor;
pad = _pad; // Inject pad to avoid a circular dependency. pad = _pad; // Inject pad to avoid a circular dependency.

View file

@ -471,9 +471,8 @@ const pad = {
await padeditor.init(pad.padOptions.view || {}, this); await padeditor.init(pad.padOptions.view || {}, this);
padeditbar.init(); padeditbar.init();
pad.collabClient = getCollabClient( pad.collabClient =
padeditor.ace, clientVars.collab_client_vars, pad.myUserInfo, getCollabClient(padeditor.ace, clientVars.collab_client_vars, pad.myUserInfo, pad);
{colorPalette: pad.getColorPalette()}, pad);
pad.collabClient.setOnUserJoin(pad.handleUserJoin); pad.collabClient.setOnUserJoin(pad.handleUserJoin);
pad.collabClient.setOnUpdateUserInfo(pad.handleUserUpdate); pad.collabClient.setOnUpdateUserInfo(pad.handleUserUpdate);
pad.collabClient.setOnUserLeave(pad.handleUserLeave); pad.collabClient.setOnUserLeave(pad.handleUserLeave);