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

The same body repeated in different condition branch #415

Open
thexpand opened this issue Jun 26, 2018 · 1 comment
Open

The same body repeated in different condition branch #415

thexpand opened this issue Jun 26, 2018 · 1 comment

Comments

@thexpand
Copy link

thexpand commented Jun 26, 2018

Take a look here:

lost/lib/lost-row.js

Lines 83 to 93 in 9ebffd0

if (lostRowGutter !== '0') {
decl.cloneBefore({
prop: 'height',
value: lgLogic.calcValue(lostRow, lostRowGutter, lostRowRounder, unit)
});
} else {
decl.cloneBefore({
prop: 'height',
value: lgLogic.calcValue(lostRow, lostRowGutter, lostRowRounder, unit)
});
}

The same body is used in both the if and the else clause.
What is happening? Isn't that some kind of mistake?

@peterramsing
Copy link
Owner

That's probably something that was there before I refactored everything to use lgLogic. Now the logic handles that and this could go away. Nice catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants