Skip to content

Commit

Permalink
[ts] enabled CORS for logoImage
Browse files Browse the repository at this point in the history
  • Loading branch information
gcoro committed Apr 4, 2019
1 parent bf5531c commit f0c92d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var __extends = (this && this.__extends) || (function () {
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
Expand Down Expand Up @@ -86,7 +86,7 @@ var QRCode = /** @class */ (function (_super) {
}
if (logoImage) {
var image_1 = new Image();
image_1.setAttribute("crossOrigin",'Anonymous')
image_1.crossOrigin = 'Anonymous';
image_1.onload = function () {
var dwidth = logoWidth || size * 0.2;
var dheight = logoHeight || dwidth;
Expand Down
1 change: 1 addition & 0 deletions lib/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export class QRCode extends React.Component<IProps, {}> {

if (logoImage) {
const image = new Image();
image.crossOrigin = 'Anonymous';
image.onload = () => {
const dwidth = logoWidth || size * 0.2;
const dheight = logoHeight || dwidth;
Expand Down

0 comments on commit f0c92d7

Please sign in to comment.