Skip to content

Commit

Permalink
Fix feature article script cause missing article #85
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed May 7, 2021
1 parent 07b1685 commit a971f04
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 a971f04

Please sign in to comment.