From 0c3625cd185992752fa8bf1dd1343d4857af1d73 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Wed, 8 Apr 2020 15:43:50 +0700 Subject: [PATCH] fixed flow-display error --- src/components/flow/Cell/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/flow/Cell/index.tsx b/src/components/flow/Cell/index.tsx index 47422465..c687156f 100644 --- a/src/components/flow/Cell/index.tsx +++ b/src/components/flow/Cell/index.tsx @@ -102,9 +102,10 @@ const Cell: FC = ({ }, [id, flow, onChangeCellView]); const thumb = useMemo(() => { - const preset = THUMBNAIL_SIZES[flow.display] || THUMBNAIL_SIZES.default; + const preset = + (flow && flow.display && THUMBNAIL_SIZES[flow.display]) || THUMBNAIL_SIZES.default; return getURL({ url: thumbnail }, preset); - }, [thumbnail, flow.display]); + }, [thumbnail, flow]); return (