From 5ff72b7ec446baf33a77dc87a56e78e7bdaaa3dc Mon Sep 17 00:00:00 2001 From: lby Date: Tue, 12 Jul 2022 11:22:09 +0800 Subject: [PATCH] fix: storytelling widget does not get layers' title (#273) --- .../molecules/Visualizer/Widget/Storytelling/hooks.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/molecules/Visualizer/Widget/Storytelling/hooks.ts b/src/components/molecules/Visualizer/Widget/Storytelling/hooks.ts index 57cbfc51ee..3b5d42fd9e 100644 --- a/src/components/molecules/Visualizer/Widget/Storytelling/hooks.ts +++ b/src/components/molecules/Visualizer/Widget/Storytelling/hooks.ts @@ -95,7 +95,8 @@ export default function ({ ...story, title: story.title || (story.layer && findLayerById?.(story.layer)?.title) || "", })); - }, [findLayerById, storiesData]); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [findLayerById, storiesData, reearth?.layers?.layers]); const selectAt = useCallback( (index: number) => {