Do not replace color if image not loaded

This commit is contained in:
mike-000
2021-09-25 13:24:39 +01:00
committed by GitHub
parent d66f2f4091
commit 564d4f867f

View File

@@ -219,7 +219,11 @@ class IconImage extends EventTarget {
* @private * @private
*/ */
replaceColor_(pixelRatio) { replaceColor_(pixelRatio) {
if (!this.color_ || this.canvas_[pixelRatio]) { if (
!this.color_ ||
this.canvas_[pixelRatio] ||
this.imageState_ !== ImageState.LOADED
) {
return; return;
} }