Skip to content

Commit

Permalink
Merge pull request #86 from auroral-ui/TriDiamond/issue85
Browse files Browse the repository at this point in the history
Fix feature article script cause missing article #85
  • Loading branch information
bennyxguo authored May 7, 2021
2 parents 07b1685 + a971f04 commit d240bdd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/lib/generators/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,13 @@ class PostGenerator {
this.isFeature = false
} else {
// Fill until max feature capacity.
dummyData.some(value => {
if (featureData.length === this.featureCapacity) return true
value.data.feature = true
featureData.unshift(value)
dummyData.some((value, index) => {
if (featureData.length === this.featureCapacity) {
fillOutIndexes.shift(fillOutIndexes.indexOf(index), 1)
} else {
value.data.feature = true
featureData.unshift(value)
}
})
}

Expand Down

0 comments on commit d240bdd

Please sign in to comment.