diff --git a/src/ts/@overflow/commons/invoke/ServiceInvoker.ts b/src/ts/@overflow/commons/invoke/ServiceInvoker.ts index d915448..600ee3d 100644 --- a/src/ts/@overflow/commons/invoke/ServiceInvoker.ts +++ b/src/ts/@overflow/commons/invoke/ServiceInvoker.ts @@ -8,14 +8,14 @@ export class ServiceInvoker { public invoke(className: string, methodName: string, params?: any): void { let classObj: Object = this.configMap.get(className); - if (classObj === null) { + if (classObj === null || classObj === undefined) { console.log('Error: Cannot find the class. [' + className + ']'); return; } - if (!classObj.hasOwnProperty(methodName)) { + if (classObj[methodName] === undefined) { console.log('Error: Cannot find the method. [' + methodName + ']'); return; } - classObj[methodName](); + classObj[methodName](params); } }