From 1e89c39c5bcba6c68211f965ef98007629536ea7 Mon Sep 17 00:00:00 2001 From: yisraelx Date: Tue, 26 Jun 2018 21:51:43 +0300 Subject: [PATCH] fix(keys): that if collection is Promise then is not resolve --- modules/keys/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/keys/index.ts b/modules/keys/index.ts index dce027f..95773a8 100644 --- a/modules/keys/index.ts +++ b/modules/keys/index.ts @@ -20,8 +20,10 @@ import _keys from '@promises/_keys'; * ``` */ function keys(collection: IOptionalPromise | IDictionary>): Promise { - let keys = _keys(collection); - return Promise.resolve(keys); + return Promise.resolve(collection).then((collection: ArrayLike | IDictionary) => { + let keys: string[] = _keys(collection); + return Promise.resolve(keys); + }); } export default keys;