Skip to content

Commit

Permalink
Merge pull request #724 from alibaba/fix-atag
Browse files Browse the repository at this point in the history
fix: atag image getSourceUrl
  • Loading branch information
yuanyan committed Nov 13, 2018
2 parents cd76f2a + 16567ce commit c3b1630
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/atag/src/components/image/index.js
Expand Up @@ -99,7 +99,7 @@ export default class ImageElement extends PolymerElement {
this.state = LOADING;
const image = this.image = new Image();

image.onload = e => {
image.onload = (evt) => {
this.state = DONE;

if (this._needAdaptHeight) {
Expand All @@ -118,7 +118,7 @@ export default class ImageElement extends PolymerElement {
this.dispatchEvent(customEvent);
};

image.onerror = e => {
image.onerror = (evt) => {
this.state = DONE;
const customEvent = new CustomEvent('error', {
bubbles: false,
Expand All @@ -129,7 +129,7 @@ export default class ImageElement extends PolymerElement {
});
this.dispatchEvent(customEvent);
};
image.src = this.src;
image.src = this._getSourceUrl();
this._render();
}

Expand Down

0 comments on commit c3b1630

Please sign in to comment.