mirror of
https://github.com/cudr/slate-collaborative.git
synced 2025-06-13 12:54:04 +00:00
fix: bugs
This commit is contained in:
parent
a9b20ae99d
commit
0cce4b4865
@ -12,7 +12,7 @@ import { getClients } from './utils'
|
|||||||
import AutomergeBackend from './AutomergeBackend'
|
import AutomergeBackend from './AutomergeBackend'
|
||||||
|
|
||||||
export interface SocketIOCollaborationOptions {
|
export interface SocketIOCollaborationOptions {
|
||||||
entry: number | Server
|
entry: Server
|
||||||
connectOpts?: SocketIO.ServerOptions
|
connectOpts?: SocketIO.ServerOptions
|
||||||
defaultValue?: Node[]
|
defaultValue?: Node[]
|
||||||
saveFrequency?: number
|
saveFrequency?: number
|
||||||
|
@ -19,7 +19,7 @@ const removeTextOp = (op: Automerge.Diff) => (map: any, doc: Element) => {
|
|||||||
|
|
||||||
if (typeof index !== 'number') return
|
if (typeof index !== 'number') return
|
||||||
|
|
||||||
const text = node?.text[index] || '*'
|
const text = node?.text?.[index] || '*'
|
||||||
|
|
||||||
if (node) {
|
if (node) {
|
||||||
node.text = node.text?.slice(0, index) + node.text?.slice(index + 1)
|
node.text = node.text?.slice(0, index) + node.text?.slice(index + 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user