Skip to content

Commit

Permalink
fix: 填充图片错误
Browse files Browse the repository at this point in the history
  • Loading branch information
zkz098 committed Dec 3, 2023
1 parent fb8d433 commit 6714e06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/helpers/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const randomBG = function (count = 1, image_server:string = null, image_list:str

if (count && count > 1) {
let shuffled = image_list.slice(0)
while (shuffled.length < 6) {
while (shuffled.length <= 6) {
shuffled = shuffled.concat(image_list.slice(0))
}
i = image_list.length
i = shuffled.length
const min = i - count; let temp; let index
while (i-- > min) {
index = Math.floor((i + 1) * Math.random())
Expand Down

0 comments on commit 6714e06

Please sign in to comment.