mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-13 21:53:43 +01:00
Merge pull request #12219 from overleaf/em-camel-case-web
Camel case variables in web GitOrigin-RevId: 28e61b759b27f71265f33ab64f588374dba610e0
This commit is contained in:
@@ -170,14 +170,14 @@ function rewindOp(content, op, log) {
|
||||
// is the case with this op, and shift p back appropriately to match
|
||||
// ShareJS if so.
|
||||
let { p } = op
|
||||
const max_p = content.length - op.i.length
|
||||
if (p > max_p) {
|
||||
const maxP = content.length - op.i.length
|
||||
if (p > maxP) {
|
||||
log.opError(
|
||||
'invalid offset rewinding insert, truncating to content length',
|
||||
content,
|
||||
op
|
||||
)
|
||||
p = max_p
|
||||
p = maxP
|
||||
}
|
||||
const textToBeRemoved = content.slice(p, p + op.i.length)
|
||||
if (op.i !== textToBeRemoved) {
|
||||
|
||||
Reference in New Issue
Block a user