Trace only string method names (#141)

This commit is contained in:
JoelEinbinder 2017-07-26 11:48:40 -07:00 committed by Andrey Lushnikov
parent 9363a15cce
commit 2e6751d6f5

View File

@ -106,7 +106,7 @@ class Helper {
return;
for (let methodName of Reflect.ownKeys(classType.prototype)) {
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;
Reflect.set(classType.prototype, methodName, function(...args) {
let argsText = args.map(stringifyArgument).join(', ');