Skip to content

Commit 287dda2

Browse files
author
Axe Hoang
committed
feat(): add compare target prototype equal to inheritance property
1 parent da3531a commit 287dda2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/utils/is-target-equal-util.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@ export function isTargetEqual<T extends TargetHost, U extends TargetHost>(
33
a: T,
44
b: U,
55
) {
6-
return a.target === b.target;
6+
return a.target === b.target || (
7+
a.target.prototype ?
8+
isTargetEqual({ target: (a.target as any).__proto__ }, b) :
9+
false
10+
);
711
}

0 commit comments

Comments
 (0)