Skip to content

Commit c3f1978

Browse files
authored
fix(kit): add null-safety check to detect vue reactive linked list node (#661)
1 parent 7be872e commit c3f1978

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/devtools-kit/src/shared/transfer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function isArray(_data: unknown, proto: string): _data is unknown[] {
1313

1414
// See https://github1s.com/vuejs/core/blob/HEAD/packages/reactivity/src/dep.ts#L32-L33
1515
function isVueReactiveLinkNode(node) {
16-
const constructorName = node.constructor.name
16+
const constructorName = node?.constructor?.name
1717
return (constructorName === 'Dep' && 'activeLink' in node) || (constructorName === 'Link' && 'dep' in node)
1818
}
1919

0 commit comments

Comments
 (0)