fix: fix parsing rgba error

This commit is contained in:
gloryyin
2022-09-10 14:44:33 +08:00
parent fe69f7c0ad
commit ce32a3240e
2 changed files with 10 additions and 2 deletions

View File

@@ -324,8 +324,11 @@ export class Shape<
return this._getCache(SHADOW_RGBA, this._getShadowRGBA);
}
_getShadowRGBA() {
if (this.hasShadow()) {
var rgba = Util.colorToRGBA(this.shadowColor());
if (!this.hasShadow()) {
return;
}
var rgba = Util.colorToRGBA(this.shadowColor());
if (rgba) {
return (
'rgba(' +
rgba.r +