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: component render's function #9

Merged
merged 1 commit into from
Apr 24, 2021
Merged

Conversation

aut8
Copy link
Contributor

@aut8 aut8 commented Apr 20, 2021

I've got the same issue as #8

so I look into the render function and I've found that the problem might be with these lines

[
h({
template: icon.contents,
}),
],

since the content of svg is the icon's path, so I try to use innerHTML instead and the problem is gone.

would it be better to use innerHTML of vnode property instead of h({ template: icon.contents })?

@codecov-commenter
Copy link

Codecov Report

Merging #9 (b322263) into main (cecbf9a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main       #9   +/-   ##
=======================================
  Coverage   88.23%   88.23%           
=======================================
  Files           2        2           
  Lines          17       17           
  Branches        2        2           
=======================================
  Hits           15       15           
  Misses          1        1           
  Partials        1        1           
Impacted Files Coverage Δ
src/vue-feather.vue 86.66% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cecbf9a...b322263. Read the comment docs.

@fengyuanchen
Copy link
Owner

Good solution!

@fengyuanchen fengyuanchen merged commit a08bef5 into fengyuanchen:main Apr 24, 2021
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.

None yet

3 participants