Skip to content

Commit

Permalink
fix(jsonp): callbackName
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Aug 20, 2023
1 parent 9a6c711 commit 50340b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/jsonp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function jsonp<D = any>(
// @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];
Expand Down

0 comments on commit 50340b5

Please sign in to comment.