mirror of
https://github.com/overleaf/overleaf.git
synced 2025-01-30 18:50:47 +00:00
Ensure falsy value doesn't fail conditional
This commit is contained in:
parent
937bf82a2f
commit
c67150ea10
1 changed files with 2 additions and 2 deletions
|
@ -108,8 +108,8 @@ module.exports = WebsocketController =
|
|||
for comment in ranges?.comments or []
|
||||
comment.op.c = encodeForWebsockets(comment.op.c)
|
||||
for change in ranges?.changes or []
|
||||
change.op.i = encodeForWebsockets(change.op.i) if change.op.i
|
||||
change.op.d = encodeForWebsockets(change.op.d) if change.op.d
|
||||
change.op.i = encodeForWebsockets(change.op.i) if change.op.i?
|
||||
change.op.d = encodeForWebsockets(change.op.d) if change.op.d?
|
||||
catch err
|
||||
logger.err {err, project_id, doc_id, fromVersion, ranges, client_id: client.id}, "error encoding range uri component"
|
||||
return callback(err)
|
||||
|
|
Loading…
Reference in a new issue