From 50340b567d5f9a9af3d5581108b488d610394523 Mon Sep 17 00:00:00 2001 From: whatwewant Date: Sun, 20 Aug 2023 21:59:22 +0800 Subject: [PATCH] fix(jsonp): callbackName --- packages/jsonp/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jsonp/src/index.ts b/packages/jsonp/src/index.ts index 8e9280b3..523ab52e 100644 --- a/packages/jsonp/src/index.ts +++ b/packages/jsonp/src/index.ts @@ -43,7 +43,7 @@ export async function jsonp( // @S1 prepare callback const callbackName = options?.callbackName || - `_zodash_jsonp_callvack_${uuid().replace(/_/g, '_')}`; + `_zodash_jsonp_callvack_${uuid().replace(/-/g, '_')}`; const callbackFn = (data: D) => { // clear callback delete window[callbackName];