Skip to content

Commit

Permalink
fix(mixin): filter private methods in mixin util
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Apr 5, 2024
1 parent 68b555a commit beb8610
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
export function mixInto(targetInstance: object, mixinInstance: object) {
Object.getOwnPropertyNames(mixinInstance.constructor.prototype)
.filter((prop) => prop !== 'constructor')
.filter((prop) => prop !== 'constructor' && !prop.startsWith('#'))
.forEach((method) => {
targetInstance[method] = mixinInstance[method].bind(mixinInstance);
});
Expand Down

0 comments on commit beb8610

Please sign in to comment.