diff --git a/common/script/index.js b/common/script/index.js index b7f89a6cf3..dea42ee9a8 100644 --- a/common/script/index.js +++ b/common/script/index.js @@ -126,7 +126,7 @@ preenHistory = function(history) { */ api.preenTodos = function(tasks) { - return _.where(tasks, function(t) { + return _.filter(tasks, function(t) { return !t.completed || (t.challenge && t.challenge.id) || moment(t.dateCompleted).isAfter(moment().subtract({ days: 3 })); diff --git a/common/script/src/content/helpers.js b/common/script/src/content/helpers.js index 793884e42c..ca9f0bf074 100644 --- a/common/script/src/content/helpers.js +++ b/common/script/src/content/helpers.js @@ -1,4 +1,4 @@ -import {each, defaults, assign, capitalize, camelCase} from 'lodash'; +import { each, defaults, assign, capitalize, camelCase } from 'lodash'; import i18n from '../i18n'; diff --git a/test/content/gear.js b/test/content/gear.js index 7da129cb26..1e6a80ffe9 100644 --- a/test/content/gear.js +++ b/test/content/gear.js @@ -1,8 +1,7 @@ import { expectValidTranslationString, } from '../helpers/content.helper'; -import { each } from 'lodash'; -import camelCase from 'lodash.camelcase'; +import { each, camelCase } from 'lodash'; import { tree as allGear } from '../../common/script/content/gear'; import backerGear from '../../common/script/content/gear/sets/special/special-backer';