Skip to content

Commit db27423

Browse files
committed
Fixed trait checking for same method not working when dealing with different modules
1 parent 9d6b9db commit db27423

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/processor/annotation/Traits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Traits.prototype = {
7575
subjectMethod = subjectProto[methodName],
7676
traitMethod = traitProto[methodName],
7777
sameMethodName = (subjectMethod && traitMethod),
78-
methodsAreNotTheSame = sameMethodName && (subjectMethod !== traitMethod),
78+
methodsAreNotTheSame = sameMethodName && (subjectMethod.toString() !== traitMethod.toString()),
7979
traitMethodIsNotARequired = sameMethodName && (traitMethod.name !== requiredMethodName),
8080
subjecMethodIsNotARequired = sameMethodName && (subjectMethod.name !== requiredMethodName);
8181

0 commit comments

Comments
 (0)