diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -227,10 +227,11 @@ threadInfo: ?ThreadInfo, permission: ThreadPermission, ): boolean { - const threads = useThreadsWithPermission( - threadInfo ? [threadInfo] : [], - permission, + const threadInfos = React.useMemo( + () => (threadInfo ? [threadInfo] : []), + [threadInfo], ); + const threads = useThreadsWithPermission(threadInfos, permission); return threads.length === 1; }