From a3df11d36d85eaa2db4d1e5f9e198f5280134c67 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Fri, 5 Mar 2021 12:52:33 +1300 Subject: [PATCH] Fix instagram infinite loop bug --- .../blocks/instagram-gallery/use-instagram-gallery.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/extensions/blocks/instagram-gallery/use-instagram-gallery.js b/projects/plugins/jetpack/extensions/blocks/instagram-gallery/use-instagram-gallery.js index 7fcfd1b98439c..80811394ac2cb 100644 --- a/projects/plugins/jetpack/extensions/blocks/instagram-gallery/use-instagram-gallery.js +++ b/projects/plugins/jetpack/extensions/blocks/instagram-gallery/use-instagram-gallery.js @@ -71,7 +71,8 @@ export default function useInstagramGallery( { setAttributes( { accessToken: undefined, instagramUser: undefined } ); setSelectedAccount( undefined ); } ); - }, [ accessToken, noticeOperations, setAttributes, setSelectedAccount ] ); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [ accessToken, setAttributes, setSelectedAccount ] ); return { images, isLoadingGallery, setImages }; }