瀏覽代碼

fix: notion binding (#2572)

zxhlyh 1 年之前
父節點
當前提交
0c0e96c55f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      web/hooks/use-pay.tsx

+ 1 - 1
web/hooks/use-pay.tsx

@@ -122,7 +122,7 @@ export const useCheckNotion = () => {
   const notionCode = searchParams.get('code')
   const notionError = searchParams.get('error')
   const { data } = useSWR(
-    canBinding
+    (canBinding && notionCode)
       ? `/oauth/data-source/binding/notion?code=${notionCode}`
       : null,
     fetchDataSourceNotionBinding,