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: guard for first frame in buildCodeFrameError #127

Merged
merged 3 commits into from
Oct 10, 2017
Merged

Conversation

thymikee
Copy link
Member

Summary

This came out while testing Linaria with CRA and Next.js, for some reason (didn't have time to investigate why) frames were passed either empty or with undefined object.

Test plan

covered

@codecov
Copy link

codecov bot commented Oct 10, 2017

Codecov Report

Merging #127 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
+ Coverage   97.72%   97.73%   +0.01%     
==========================================
  Files          19       19              
  Lines         395      398       +3     
  Branches       72       74       +2     
==========================================
+ Hits          386      389       +3     
  Misses          9        9
Impacted Files Coverage Δ
src/babel/lib/errorUtils.js 100% <100%> (ø) ⬆️

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 ce268c1...ed66be9. Read the comment docs.

@zamotany
Copy link
Contributor

If you're still interested this might be why it's happening:
https://github.com/callstack/linaria/blob/master/src/babel/lib/errorUtils.js#L22-L25

@zamotany zamotany merged commit c1d5fda into master Oct 10, 2017
@zamotany zamotany deleted the fix/frame branch October 10, 2017 08:41
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