fix: slateOps undefined on toSlateOp error

This commit is contained in:
Eric Maciel 2021-01-12 09:48:08 -05:00
parent 5832eee291
commit 89dafd78b9

View File

@ -132,7 +132,7 @@ export const AutomergeConnector = {
if (operations.length) {
let slateOps: any[]
try {
slateOps = toSlateOp(operations, current)
slateOps = toSlateOp(operations, current) || []
} catch (err) {
e.handleError(err, {
type: 'applyOperation - toSlateOp',