mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
Fix undefined caused toJS failure.
This commit is contained in:
parent
3f32575418
commit
dfbb59616a
@ -6,6 +6,9 @@ import { CollabAction } from '../model'
|
|||||||
export * from './testUtils'
|
export * from './testUtils'
|
||||||
|
|
||||||
const toJS = (node: any) => {
|
const toJS = (node: any) => {
|
||||||
|
if (node === undefined) {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
return JSON.parse(JSON.stringify(node))
|
return JSON.parse(JSON.stringify(node))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user