From cb6a334605d323383e35e4026edd16e94e3c87bc Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Tue, 23 Apr 2019 04:56:22 +0200 Subject: [PATCH] feat(state): get unsafely retrieves values for keys --- src/state/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/state/index.ts b/src/state/index.ts index a88c733..aec74de 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -1,5 +1,4 @@ import load, { ILoad } from './load'; -import { get } from 'slimconf'; import mergewith from 'lodash.mergewith'; import { IBaseOptions, IScopeOptions, TOptions } from '~/types'; import { DEFAULT_LOG_LEVEL } from '~/constants'; @@ -38,8 +37,8 @@ export default { states.scope = options; merge(); }, - get(path: keyof TOptions): any { - return get(state, path, false); + get(key: keyof TOptions): any { + return state[key]; }, load(): Promise { return config.then((x) => x.load);