Skip to content

Commit

Permalink
Update GH pages using commit e41431a
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Oct 22, 2023
1 parent e4e3f08 commit 20d8b47
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exif-reader.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion exif-reader.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function getBase64Image(image) {
if (typeof Buffer === 'undefined') {
return undefined;
}
if (typeof Buffer.from !== undefined) { // eslint-disable-line no-undef
if (typeof Buffer.from !== 'undefined') { // eslint-disable-line no-undef
return Buffer.from(image).toString('base64'); // eslint-disable-line no-undef
}
return (new Buffer(image)).toString('base64'); // eslint-disable-line no-undef
Expand All @@ -84,15 +84,15 @@ export function dataUriToBuffer(dataUri) {
if (typeof Buffer === 'undefined') {
return undefined;
}
if (typeof Buffer.from !== undefined) { // eslint-disable-line no-undef
if (typeof Buffer.from !== 'undefined') { // eslint-disable-line no-undef
return Buffer.from(data, 'base64'); // eslint-disable-line no-undef
}
return new Buffer(data, 'base64'); // eslint-disable-line no-undef
}

const decodedData = decodeURIComponent(data);
if (typeof Buffer !== 'undefined') {
if (typeof Buffer.from !== undefined) { // eslint-disable-line no-undef
if (typeof Buffer.from !== 'undefined') { // eslint-disable-line no-undef
return Buffer.from(decodedData); // eslint-disable-line no-undef
}
return new Buffer(decodedData); // eslint-disable-line no-undef
Expand Down

0 comments on commit 20d8b47

Please sign in to comment.