Skip to content

Commit 034c950

Browse files
committed
use the toBlob method from icoResult
1 parent feaffea commit 034c950

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

packages/origine2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"axios": "^1.6.0",
4040
"classnames": "^2.5.1",
4141
"cloudlogjs": "^1.0.11",
42-
"img2ico": "^1.3.0",
42+
"img2ico": "^1.3.1",
4343
"lodash": "^4.17.21",
4444
"material-icon-theme": "^4.27.0",
4545
"mitt": "^3.0.1",

packages/origine2/src/components/IconCreator/IconCreator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ const IconCreator = ({ gameDir, triggerButton }: { gameDir: string, triggerButto
483483
const webIconArrayBuffer = await webIconBlob.arrayBuffer();
484484
const icoResult = await img2ico(webIconArrayBuffer);
485485
const icoDataUrl = icoResult.toDataUrl();
486-
const icoBlob = await fetch(icoDataUrl).then(res => res.blob());
486+
const icoBlob = icoResult.toBlob();
487487

488488
const previewIcons: IIcons = {
489489
ico: { name: 'Ico', src: icoDataUrl },

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8148,10 +8148,10 @@ image-q@^4.0.0:
81488148
dependencies:
81498149
"@types/node" "16.9.1"
81508150

8151-
img2ico@^1.3.0:
8152-
version "1.3.0"
8153-
resolved "https://registry.yarnpkg.com/img2ico/-/img2ico-1.3.0.tgz#b879ff6abb91fff5e6dada8fba892014e13c5ac6"
8154-
integrity sha512-lknA3SgeDrz7b2Erd6s0JyEQMSp8Ay2SSMggop32SkzlN9HgM0CddnB7+FkzBAxMoJTzYafHbkp6IIJ3wNJ2Og==
8151+
img2ico@^1.3.1:
8152+
version "1.3.1"
8153+
resolved "https://registry.yarnpkg.com/img2ico/-/img2ico-1.3.1.tgz#d052b551fddcca7b0ca85cc0067bcae12929b87f"
8154+
integrity sha512-h60cRfyQfTIS/BS1JpDnnG2EB0qj429tWRMmHvlVL+9CTk+9AL8kX3nco4XC6ZqwXj9JzidsTdhoqTxKdF9lrQ==
81558155
dependencies:
81568156
buffer "^6.0.3"
81578157
commander "^14.0.0"

0 commit comments

Comments
 (0)