Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Moebits committed Jun 9, 2023
1 parent 722c20a commit 173f1ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,8 @@ const upscale = async (info: any) => {
if (path.extname(info.source) === ".png") inMime = "image/png"
meta = imagesMeta.readMeta(buffer, inMime)
for (let i = 0; i < meta.length; i++) {
if (typeof meta[i]?.value !== "string") continue
meta[i].value = meta[i].value.replaceAll("26UNICODE", "").replaceAll(/\u0000/g, "")
if (typeof meta[i].value !== "string") meta[i].value = ""
meta[i].value = meta[i].value.replaceAll("UNICODE", "").replaceAll(/\u0000/g, "")
}
} catch {}
output = await waifu2x.upscaleImage(info.source, dest, options, action)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 173f1ad

Please sign in to comment.