From 9d00b70897caca90f98b4eaab67c72fa9de981b6 Mon Sep 17 00:00:00 2001 From: Pavel Date: Wed, 20 Oct 2021 23:03:06 +0300 Subject: [PATCH] Compiler support: fix issue with incorrect check for missing fields in service registration (#90) --- src/internal/compilerSupport/v2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: ` +