From 3e0ea34c3e11e8f584905a2423d52f4f797f20e8 Mon Sep 17 00:00:00 2001 From: alex zhen wang Date: Tue, 4 Jun 2019 22:09:57 +1200 Subject: [PATCH] fix: clean code --- 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 449fa273e2d3..5eadce2d99e3 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] = derive[sectionName as keyof Derive] || {}; + const result = derive[sectionName as keyof Derive] || {}; Object.keys(section).forEach((methodName) => { // @ts-ignore No idea how to make this work...