Skip to content

Commit e649ea3

Browse files
Merge branch 'master' of https://github.com/nestjs/mongoose
2 parents 099e078 + cc4b5a2 commit e649ea3

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)