Skip to content

Commit

Permalink
fix: credentials: include 产生跨域问题 (#2010)
Browse files Browse the repository at this point in the history
  • Loading branch information
lzxue authored Nov 3, 2023
1 parent 3395afd commit 1d29466
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/source/src/parser/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function loadData(data: string | string[], done: any) {
const url = data;
const imageDatas: Array<HTMLImageElement | ImageBitmap> = [];
if (typeof url === 'string') {
getImage({ url, credentials: 'include' }, (err, img) => {
getImage({ url }, (err, img) => {
if (img) {
imageDatas.push(img);
done(imageDatas);
Expand All @@ -49,7 +49,7 @@ function loadData(data: string | string[], done: any) {
const imageCount = url.length;
let imageindex = 0;
url.forEach((item) => {
getImage({ url: item, credentials: 'include' }, (err, img) => {
getImage({ url: item }, (err, img) => {
imageindex++;
if (img) {
imageDatas.push(img);
Expand Down

0 comments on commit 1d29466

Please sign in to comment.