mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +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'
|
||||
|
||||
export interface SocketIOCollaborationOptions {
|
||||
entry: number | Server
|
||||
entry: Server
|
||||
connectOpts?: SocketIO.ServerOptions
|
||||
defaultValue?: Node[]
|
||||
saveFrequency?: number
|
||||
|
@ -19,7 +19,7 @@ const removeTextOp = (op: Automerge.Diff) => (map: any, doc: Element) => {
|
||||
|
||||
if (typeof index !== 'number') return
|
||||
|
||||
const text = node?.text[index] || '*'
|
||||
const text = node?.text?.[index] || '*'
|
||||
|
||||
if (node) {
|
||||
node.text = node.text?.slice(0, index) + node.text?.slice(index + 1)
|
||||
|
Loading…
Reference in New Issue
Block a user