about summary refs log tree commit diff
path: root/patches/@discord+bottom-sheet+4.6.1.patch
blob: e3837d84d0c9d3ab9b1878d2ed257bd627e4f65d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts b/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts
index 1c788ab..d30f330 100644
--- a/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts
+++ b/node_modules/@discord/bottom-sheet/src/hooks/useStableCallback.ts
@@ -6,7 +6,7 @@ type Callback = (...args: any[]) => any;
  * https://gist.github.com/JakeCoxon/c7ebf6e6496f8468226fd36b596e1985
  */
 export const useStableCallback = (callback: Callback) => {
-  const callbackRef = useRef<Callback>();
+  const callbackRef = useRef<Callback>(undefined);
   const memoCallback = useCallback(
     (...args: any) => callbackRef.current && callbackRef.current(...args),
     []