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

Remove unreachable code #34

Merged
merged 2 commits into from
Oct 6, 2019
Merged

Remove unreachable code #34

merged 2 commits into from
Oct 6, 2019

Conversation

mesaugat
Copy link
Member

@mesaugat mesaugat commented Oct 6, 2019

I was going through the code coverage and saw that updateStore was checking whether active domain existed or not. However, set method already does this when calling getStore(). This piece of code is unreachable.

getStore() checks for active domain before updating the store.
@codecov-io
Copy link

Codecov Report

Merging #34 into master will increase coverage by 1.23%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #34      +/-   ##
==========================================
+ Coverage   84.89%   86.13%   +1.23%     
==========================================
  Files           5        5              
  Lines         139      137       -2     
  Branches       23       22       -1     
==========================================
  Hits          118      118              
+ Misses         16       15       -1     
+ Partials        5        4       -1
Impacted Files Coverage Δ
src/impl/domain.ts 96% <ø> (+2.49%) ⬆️

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 cefc3e7...88cf2bd. Read the comment docs.

Copy link
Contributor

@kabirbaidhya kabirbaidhya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. Looks like this case was already covered in getStore().

@kabirbaidhya kabirbaidhya merged commit 38ea1a5 into master Oct 6, 2019
@kabirbaidhya kabirbaidhya deleted the unreachable-code branch October 6, 2019 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants