From fcdceeb48f84bb71aa538b1cf22d8621ef4bd277 Mon Sep 17 00:00:00 2001 From: Alexander Zech Date: Fri, 15 Jul 2022 19:48:28 -0700 Subject: [PATCH] fix: get list of all functions in child class --- src/utils/class.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/class.js b/src/utils/class.js index 290f36d1..6b062d90 100644 --- a/src/utils/class.js +++ b/src/utils/class.js @@ -46,7 +46,7 @@ export function extendClassStaticProps(childClass, parentClass, excludedProps = export function extendThis(child, childClass, parentClass, excludedProps = [], ...args) { let props; let obj = new parentClass.prototype.constructor(...args); - const exclude = ["constructor", ...Object.getOwnPropertyNames(childClass)]; + const exclude = ["constructor", ...Object.getOwnPropertyNames(childClass.prototype)]; const seen = []; // remember most recent occurrence of prop name (like inheritance) while (obj.__proto__) { props = Object.getOwnPropertyNames(obj.__proto__);