fix: clean code (#1)

This commit is contained in:
Alex Wang
2019-06-05 10:04:08 +12:00
committed by ian.he
parent 63e08d8357
commit 0055cb594f
+1 -1
View File
@@ -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...