diff --git a/scripts/lib/generators/post.js b/scripts/lib/generators/post.js index c1b19380..91cf8ba1 100644 --- a/scripts/lib/generators/post.js +++ b/scripts/lib/generators/post.js @@ -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) + } }) }