From 827570f6b27016991557bbb2d8fe454787376a8b Mon Sep 17 00:00:00 2001 From: landaiqing <3517283258@qq.com> Date: Sun, 5 May 2024 02:22:00 +0800 Subject: [PATCH] fix: crypto.randomUUID is not a function --- src/api/captcha/canvas.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/captcha/canvas.ts b/src/api/captcha/canvas.ts index c86cf71..ab7eac8 100644 --- a/src/api/captcha/canvas.ts +++ b/src/api/captcha/canvas.ts @@ -35,7 +35,7 @@ const build = (img: HTMLImageElement, sizes: number[]): [number, string] => { const ctx = canvas.getContext('2d') const coordinate = size / 2 - const moveX = Math.floor(Math.random() * (max - min + 1)) + 0 + const moveX = Math.floor(Math.random() * (max - min + 1)) ctx?.beginPath() ctx?.translate(coordinate, coordinate)