Secure type of HTMLImageElement in ImageTile
This commit is contained in:
1 parent
d062904cc1
commit
e740e7577a
1 file changed
+2
-1
+2
-1
@@ -114,7 +114,8 @@ class ImageTile extends Tile {
|
||||
* @private
|
||||
*/
|
||||
handleImageLoad_() {
|
||||
if (this.image_.naturalWidth && this.image_.naturalHeight) {
|
||||
if (this.image_ instanceof HTMLImageElement &&
|
||||
this.image_.naturalWidth && this.image_.naturalHeight) {
|
||||
this.state = TileState.LOADED;
|
||||
} else {
|
||||
this.state = TileState.EMPTY;
|
||||
|
||||
Reference in new issue
Block a user