Merge pull request #12813 from mike-000/fix-zero-size

Do not replace icon color if image not loaded
This commit is contained in:
Tim Schaub
2021-10-12 13:33:34 -06:00
committed by GitHub

View File

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