Skip to content

Commit e5f34fc

Browse files
author
winjo
committed
fix: getFunctionProps
1 parent 79fe3ef commit e5f34fc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/common/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const getFunctionProps = (obj: Record<string, any>): string[] => {
1010
const props = new Set<string>();
1111

1212
// class 上的原型方法不可遍历
13-
if (/^class\s/.test(Function.prototype.toString.call(obj.constructor))) {
13+
if (/^\s*class/.test(Function.prototype.toString.call(obj.constructor))) {
1414
addFunctionProps(obj, 'getOwnPropertyNames');
1515
} else {
1616
addFunctionProps(obj, 'keys');

0 commit comments

Comments
 (0)