From a36a70e30c8b4b0d582e6ef1c08a2d915dc0f6d5 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Mon, 10 Aug 2020 13:32:03 +0300 Subject: [PATCH] store: improve typing in cache deserialize. --- src/store/construct.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/construct.ts b/src/store/construct.ts index e1f830e..ccd3dc6 100644 --- a/src/store/construct.ts +++ b/src/store/construct.ts @@ -102,12 +102,12 @@ const cacheSerialize = (state: any, key: string | number) => { const cacheDeserialize = (state: any, key: string | number) => { if (key === "collections") { - return ImmutableMap(state).map((x: string) => { + return ImmutableMap(state).map((x) => { return Etebase.fromBase64(x); }); } else if (key === "items") { return ImmutableMap(state).map((item: any) => { - return ImmutableMap(item).map((x: string) => Etebase.fromBase64(x)); + return ImmutableMap(item).map((x) => Etebase.fromBase64(x)); }); }