Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
tsctx committed Dec 1, 2023
1 parent cd93cdb commit 058dc02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/fetch/dataURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,11 @@ function forgivingBase64 (data) {
if (dataLength % 4 === 0) {
// 1. If data ends with one or two U+003D (=) code points,
// then remove them from data.
if (data.charCodeAt(dataLength - 1) === 0x003D && data.charCodeAt(--dataLength) === 0x003D) {
if (data.charCodeAt(dataLength - 1) === 0x003D) {
--dataLength
if (data.charCodeAt(dataLength - 1) === 0x003D) {
--dataLength
}
}
}

Expand Down

0 comments on commit 058dc02

Please sign in to comment.