mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 07:22:04 +00:00
Pass option to encode range
To ensure backwards compat with clients not refreshing, pass a flag to enable encoding. This way, old client won't receive encoded ranges, but also won't have decoding logic. The flag can then be removed once all clients are up to date
This commit is contained in:
parent
b33929fa83
commit
e2bb6dcecb
1 changed files with 2 additions and 2 deletions
|
@ -252,7 +252,7 @@ define [
|
|||
|
||||
_joinDoc: (callback = (error) ->) ->
|
||||
if @doc?
|
||||
@ide.socket.emit 'joinDoc', @doc_id, @doc.getVersion(), (error, docLines, version, updates, ranges) =>
|
||||
@ide.socket.emit 'joinDoc', @doc_id, { encodeRanges: true }, @doc.getVersion(), (error, docLines, version, updates, ranges) =>
|
||||
return callback(error) if error?
|
||||
@joined = true
|
||||
@doc.catchUp( updates )
|
||||
|
@ -260,7 +260,7 @@ define [
|
|||
@_catchUpRanges( changes, comments )
|
||||
callback()
|
||||
else
|
||||
@ide.socket.emit 'joinDoc', @doc_id, (error, docLines, version, updates, ranges) =>
|
||||
@ide.socket.emit 'joinDoc', @doc_id, { encodeRanges: true }, (error, docLines, version, updates, ranges) =>
|
||||
return callback(error) if error?
|
||||
@joined = true
|
||||
@doc = new ShareJsDoc @doc_id, docLines, version, @ide.socket
|
||||
|
|
Loading…
Add table
Reference in a new issue