Removed sn undefined warning (#572)
This commit is contained in:
@@ -39,7 +39,7 @@ export function createMirror(): Mirror {
|
|||||||
map: {},
|
map: {},
|
||||||
getId(n) {
|
getId(n) {
|
||||||
// if n is not a serialized INode, use -1 as its id.
|
// if n is not a serialized INode, use -1 as its id.
|
||||||
if (!n.__sn) {
|
if (!n || !n.__sn) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return n.__sn.id;
|
return n.__sn.id;
|
||||||
|
|||||||
Reference in New Issue
Block a user