Skip to content

Commit f091cdd

Browse files
authored
fix(captcha): correct the wasm URL of Cap captcha (#331)
1 parent 31c2873 commit f091cdd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/component/Common/Captcha/CapCaptcha.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { CaptchaParams } from "./Captcha.tsx";
55
import { Box, useTheme } from "@mui/material";
66

77
// Cap Widget URLs
8-
const CAP_WASM_UNPKG_URL = "https://unpkg.com/@cap.js/wasm@0.0.4/browser/cap_wasm.js";
9-
const CAP_WASM_JSDELIVR_URL = "https://cdn.jsdelivr.net/npm/@cap.js/wasm@0.0.4/browser/cap_wasm.min.js";
8+
const CAP_WASM_UNPKG_URL = "https://unpkg.com/@cap.js/wasm/browser/cap_wasm_bg.wasm";
9+
const CAP_WASM_JSDELIVR_URL = "https://cdn.jsdelivr.net/npm/@cap.js/wasm/browser/cap_wasm_bg.wasm";
1010
const CAP_WIDGET_UNPKG_URL = "https://unpkg.com/@cap.js/widget";
1111
const CAP_WIDGET_JSDELIVR_URL = "https://cdn.jsdelivr.net/npm/@cap.js/widget";
1212

@@ -136,7 +136,7 @@ const CapCaptcha = ({ onStateChange, generation, fullWidth, ...rest }: CapProps
136136

137137
// 在加载 widget 脚本之前设置 WASM URL
138138
if (capAssetServer === "instance") {
139-
(window as any).CAP_CUSTOM_WASM_URL = `${capInstanceURL.replace(/\/$/, "")}/assets/cap_wasm.js`;
139+
(window as any).CAP_CUSTOM_WASM_URL = `${capInstanceURL.replace(/\/$/, "")}/assets/cap_wasm_bg.wasm`;
140140
} else if (capAssetServer === "unpkg") {
141141
(window as any).CAP_CUSTOM_WASM_URL = CAP_WASM_UNPKG_URL;
142142
} else {

0 commit comments

Comments
 (0)