Skip to content

Both operations have to have the same base length #37

@LaKing

Description

@LaKing

Not sure if my code uses ot correctly, as I could not compare it with the documentation ... but it works .. until suddenly the text gets duplicated multiple times on one client.

Error: Both operations have to have the same base length
    at ot.TextOperation.TextOperation.transform (/srv/codepad-project/modules/ot/node_modules/ot/lib/text-operation.js:411:13)
    at ot.WrappedOperation.WrappedOperation.transform (/srv/codepad-project/modules/ot/node_modules/ot/lib/wrapped-operation.js:66:16)
    at EditorSocketIOServer.ot.Server.Server.receiveOperation (/srv/codepad-project/modules/ot/node_modules/ot/lib/server.js:27:19)
    at EditorSocketIOServer.onOperation (/srv/codepad-project/modules/ot/editor-socketio-server.js:91:37)
    at /srv/codepad-project/modules/ot/editor-socketio-server.js:53:26
    at EditorSocketIOServer.mayWrite (/srv/codepad-project/modules/ot/editor-socketio-server.js:23:13)
    at Socket.<anonymous> (/srv/codepad-project/modules/ot/editor-socketio-server.js:48:22)
    at emitThree (events.js:136:13)
    at Socket.emit (events.js:217:7)
    at /srv/codepad-project/boilerplate/modules/server/node_modules/socket.io/lib/socket.js:527:12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions