Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(fetch): Improve fetch of detaurl #2479

Merged
merged 20 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "fixup"
This reverts commit 058dc02.
  • Loading branch information
tsctx committed Dec 1, 2023
commit a7ff05a4e128589c4c114c62ac2362dc9fad1338
5 changes: 1 addition & 4 deletions lib/fetch/dataURL.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,8 @@ 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) {
if (data.charCodeAt(dataLength - 1) === 0x003D && data.charCodeAt(--dataLength) === 0x003D) {
--dataLength
if (data.charCodeAt(dataLength - 1) === 0x003D) {
--dataLength
}
}
}

Expand Down
Loading