From 224803f4c40cd10e9aadcef0702fa2c7164ae53e Mon Sep 17 00:00:00 2001 From: "ian.he" Date: Thu, 6 Jun 2019 13:53:53 +1200 Subject: [PATCH] fix: derive generated is empty --- packages/api-derive/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-derive/src/index.ts b/packages/api-derive/src/index.ts index 5eadce2d99..449fa273e2 100644 --- a/packages/api-derive/src/index.ts +++ b/packages/api-derive/src/index.ts @@ -47,7 +47,7 @@ export interface Derive { function injectFunctions (api: ApiInterface$Rx, derive: Derive, functions: DeriveCustom): Derive { Object.keys(functions).forEach((sectionName: string) => { const section = functions[sectionName as keyof Derive]; - const result = derive[sectionName as keyof Derive] || {}; + const result = derive[sectionName as keyof Derive] = derive[sectionName as keyof Derive] || {}; Object.keys(section).forEach((methodName) => { // @ts-ignore No idea how to make this work...