about summary refs log tree commit diff
path: root/src/view/com/composer/useExternalLinkFetch.e2e.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com/composer/useExternalLinkFetch.e2e.ts')
-rw-r--r--src/view/com/composer/useExternalLinkFetch.e2e.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/view/com/composer/useExternalLinkFetch.e2e.ts b/src/view/com/composer/useExternalLinkFetch.e2e.ts
index 65ecb866e..257a3e8e5 100644
--- a/src/view/com/composer/useExternalLinkFetch.e2e.ts
+++ b/src/view/com/composer/useExternalLinkFetch.e2e.ts
@@ -8,7 +8,7 @@ import {ComposerOpts} from 'state/shell/composer'
 export function useExternalLinkFetch({}: {
   setQuote: (opts: ComposerOpts['quote']) => void
 }) {
-  const {getAgent} = useAgent()
+  const agent = useAgent()
   const [extLink, setExtLink] = useState<apilib.ExternalEmbedDraft | undefined>(
     undefined,
   )
@@ -22,7 +22,7 @@ export function useExternalLinkFetch({}: {
       return cleanup
     }
     if (!extLink.meta) {
-      getLinkMeta(getAgent(), extLink.uri).then(meta => {
+      getLinkMeta(agent, extLink.uri).then(meta => {
         if (aborted) {
           return
         }
@@ -41,7 +41,7 @@ export function useExternalLinkFetch({}: {
       })
     }
     return cleanup
-  }, [extLink, getAgent])
+  }, [extLink, agent])
 
   return {extLink, setExtLink}
 }