Skip to content

Commit

Permalink
fix(kit): add null-safety check to detect vue reactive linked list node
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Oct 30, 2024
1 parent 7be872e commit 8e2f708
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/devtools-kit/src/shared/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function isArray(_data: unknown, proto: string): _data is unknown[] {

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

Expand Down

0 comments on commit 8e2f708

Please sign in to comment.