Skip to content
Snippets Groups Projects
Commit 083f04b6 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

fix(a realiser): remove non completed actions

parent 96dc9c02
No related branches found
No related tags found
No related merge requests found
import { Action, BaseAction } from 'types/actions.type' import { Action, BaseAction } from 'types/actions.type'
import { Answer } from 'types/answers.type' import { Answer } from 'types/answers.type'
import { Favorite } from 'types/favorites.type' import { Favorite } from 'types/favorites.type'
import { isAnswerTruthy } from 'utils/utils' import { isAnswerEmpty, isAnswerTruthy } from 'utils/utils'
/** /**
* Class taking answers as a constructor * Class taking answers as a constructor
...@@ -45,7 +45,7 @@ export class ActionsProcessor { ...@@ -45,7 +45,7 @@ export class ActionsProcessor {
/** Filters only not doing actions */ /** Filters only not doing actions */
getNotDoingActions(actions: BaseAction[]): Action[] { getNotDoingActions(actions: BaseAction[]): Action[] {
return this.getActionsWithAnswers(actions).filter(action => { return this.getActionsWithAnswers(actions).filter(action => {
return !isAnswerTruthy(action) return !isAnswerTruthy(action) && !isAnswerEmpty(action)
}) })
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment