Fix undefined caused toJS failure.

This commit is contained in:
Ulion 2021-02-07 12:55:42 +08:00
parent 3f32575418
commit dfbb59616a

View File

@ -6,6 +6,9 @@ import { CollabAction } from '../model'
export * from './testUtils'
const toJS = (node: any) => {
if (node === undefined) {
return undefined
}
try {
return JSON.parse(JSON.stringify(node))
} catch (e) {