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 getComponentForEl with nested fragments (returns owner component) #1382

Merged
merged 2 commits into from Jul 8, 2019

Conversation

DylanPiercey
Copy link
Contributor

Description

Currently require('marko/components').getComponentForEl will fail to return a component if there are nested fragments at play. This PR updates the logic to always return the owner component for an element which is simpler and typically what the user wants.

Checklist:

  • I have read the CONTRIBUTING document and have signed (or will sign) the CLA.
  • I have updated/added documentation affected by my changes.
  • I have added tests to cover my changes.

@coveralls
Copy link

coveralls commented Jul 8, 2019

Coverage Status

Coverage decreased (-0.002%) to 90.593% when pulling e2db223 on get-component-for-el-fix into c401b7f on master.

@codecov
Copy link

codecov bot commented Jul 8, 2019

Codecov Report

Merging #1382 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1382      +/-   ##
==========================================
- Coverage   90.59%   90.59%   -0.01%     
==========================================
  Files         342      342              
  Lines       12494    12491       -3     
==========================================
- Hits        11319    11316       -3     
  Misses       1175     1175
Impacted Files Coverage Δ
src/runtime/components/util-browser.js 98.57% <100%> (-0.06%) ⬇️

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 c401b7f...e2db223. Read the comment docs.

@DylanPiercey DylanPiercey merged commit fc5fb03 into master Jul 8, 2019
@mlrawlings mlrawlings deleted the get-component-for-el-fix branch August 1, 2019 23:58
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

2 participants