Do not replace color if image not loaded
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user