diff --git a/src/internal/compilerSupport/v2.ts b/src/internal/compilerSupport/v2.ts index 81a496d9..f45cddae 100644 --- a/src/internal/compilerSupport/v2.ts +++ b/src/internal/compilerSupport/v2.ts @@ -339,7 +339,7 @@ export function registerService(args: any[], def: ServiceDef) { // Checking for missing keys const requiredKeys = def.functions.map((x) => x.functionName); - const incorrectServiceDefinitions = Object.keys(service).filter((f) => !(f in requiredKeys)); + const incorrectServiceDefinitions = requiredKeys.filter((f) => !(f in service)); if (!!incorrectServiceDefinitions.length) { throw new Error( `Error registering service ${serviceId}: missing functions: ` +