Trace only string method names (#141)
This commit is contained in:
parent
9363a15cce
commit
2e6751d6f5
@ -106,7 +106,7 @@ class Helper {
|
|||||||
return;
|
return;
|
||||||
for (let methodName of Reflect.ownKeys(classType.prototype)) {
|
for (let methodName of Reflect.ownKeys(classType.prototype)) {
|
||||||
const method = Reflect.get(classType.prototype, methodName);
|
const method = Reflect.get(classType.prototype, methodName);
|
||||||
if (methodName === 'constructor' || methodName.startsWith('_') || typeof method !== 'function')
|
if (methodName === 'constructor' || typeof methodName !== 'string' || methodName.startsWith('_') || typeof method !== 'function')
|
||||||
continue;
|
continue;
|
||||||
Reflect.set(classType.prototype, methodName, function(...args) {
|
Reflect.set(classType.prototype, methodName, function(...args) {
|
||||||
let argsText = args.map(stringifyArgument).join(', ');
|
let argsText = args.map(stringifyArgument).join(', ');
|
||||||
|
Loading…
Reference in New Issue
Block a user