Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Jul 15, 2021

Conversation

plainheart
Copy link
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.

src/canvas/graphic.ts Outdated Show resolved Hide resolved
src/canvas/graphic.ts Outdated Show resolved Hide resolved
@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
Collaborator Author

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

@pissang
Copy link
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