test fixes

This commit is contained in:
akizimov 2018-05-18 16:43:41 +03:00
parent ecbd9b2da8
commit 2d614d3a2d

View File

@ -33,11 +33,11 @@ const getNumbers = (state: SimpleState = simpleState, type: string): number[] =>
return state.numbers.filter(element => {
const division = element % 2;
if (division === 0 && type === ODD_NUMBERS) {
if (division === 0 && type === EVEN_NUMBERS) {
return element;
}
if (division !== 0 && type === EVEN_NUMBERS) {
if (division !== 0 && type === ODD_NUMBERS) {
return element;
}
});