Skip to content

fix(canvas): fix unexpected none or null value for ctx.strokeStyle & ctx.fillStyle#784

Merged
pissang merged 2 commits into
masterfrom
fix-css-warning
Jul 15, 2021
Merged

fix(canvas): fix unexpected none or null value for ctx.strokeStyle & ctx.fillStyle#784
pissang merged 2 commits into
masterfrom
fix-css-warning

Conversation

@plainheart
Copy link
Copy Markdown
Collaborator

To resolve apache/echarts#15238.

Because unexpected value null or 'none' is assigned to ctx.strokeStyle or ctx.fillStyle, the Firefox devtools will print lots of annoying CSS warnings.

Comment thread src/canvas/graphic.ts Outdated
Comment thread src/canvas/graphic.ts Outdated
@pissang pissang merged commit 38fa090 into master Jul 15, 2021
@pissang pissang deleted the fix-css-warning branch July 15, 2021 10:17
@plainheart
Copy link
Copy Markdown
Collaborator Author

I just want to say we can remove the null check.
typeof strokeOrFill === 'string' && strokeOrFill !== 'none'; is enough.

@pissang
Copy link
Copy Markdown
Contributor

pissang commented Jul 15, 2021

@plainheart We can improve it in another PR😅

pissang added a commit that referenced this pull request Jul 15, 2021
tweak #784, remove unnecessary null check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS Warning : " Expected color but found ‘null’/'none' " on Firefox

2 participants