Fix style TypeScript errors

This commit is contained in:
Kevin Schmidt
2018-09-14 15:57:21 -06:00
parent 7912c5d711
commit 124fccf127
8 changed files with 30 additions and 12 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ class IconImage extends EventTarget {
*/
this.image_ = !image ? new Image() : image;
if (crossOrigin !== null) {
if (crossOrigin !== null && this.image_ instanceof HTMLImageElement) {
this.image_.crossOrigin = crossOrigin;
}
@@ -194,7 +194,7 @@ class IconImage extends EventTarget {
this.handleImageLoad_, this)
];
try {
this.image_.src = this.src_;
/** @type {HTMLImageElement} */ (this.image_).src = this.src_;
} catch (e) {
this.handleImageError_();
}