From 2c3c0e8f1dba472a27718f871d8d81be819ce93c Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 14 Oct 2021 16:09:28 +0800 Subject: [PATCH] Fix 'setting.Get' runaway calls ## Issue 60 setting.Get calls spiked since October It was called 24 times per livestream page load. ## Notes The effect was intended to be a one-time effect, but the dependency was changed in 2f4dedfb --- ui/component/commentCreate/view.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 40151c761..1cb5dd1b9 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -407,7 +407,7 @@ export function CommentCreate(props: Props) { if (!channelSettings && channelId) { doFetchCreatorSettings(channelId); } - }, [channelId, channelSettings, doFetchCreatorSettings]); + }, []); // eslint-disable-line react-hooks/exhaustive-deps // Notifications: Fetch top-level comments to identify if it has been deleted and can reply to it React.useEffect(() => {