Skip to content

Commit

Permalink
fix: broken function context
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubnakielskixebia committed Mar 25, 2024
1 parent a0b88e9 commit 48f60b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xebia_email_signature/static/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ function getQueryParam(name) {
async function toDataURL(url) {
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.onload = () => {
xhr.onload = function () {
if (this.status >= 200 && this.status < 300) {
const reader = new FileReader();
reader.onloadend = () => {
reader.onloadend = function () {
resolve(reader.result);
};
reader.readAsDataURL(xhr.response);
Expand Down

0 comments on commit 48f60b4

Please sign in to comment.