Skip to content

Commit

Permalink
refactor: change method to filter
Browse files Browse the repository at this point in the history
  • Loading branch information
dchueri committed Jun 23, 2023
1 parent 92d99a6 commit 07e20b0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/plugin/minMax/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ export default (o, c, d) => {
if (dates.length === 1 && dates[0].length > 0) {
[dates] = dates
}
while (dates.indexOf(null) !== -1) {
dates.forEach((date, index) => (!date ? dates.splice(index, 1) : null))
}
dates = dates.filter(date => date)
let result;
[result] = dates
for (let i = 1; i < dates.length; i += 1) {
Expand Down

0 comments on commit 07e20b0

Please sign in to comment.