Page MenuHomePhabricator

D13874.id45690.diff
No OneTemporary

D13874.id45690.diff

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;
}

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 1:25 AM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2573410
Default Alt Text
D13874.id45690.diff (547 B)

Event Timeline