Automatic deploy 29009984

This commit is contained in:
Renan LE CARO 2025-02-26 20:44:47 +01:00
parent 7375adc934
commit 0c6f20a687
4 changed files with 21 additions and 8 deletions

View file

@ -1371,8 +1371,7 @@ function gameOver(title, intro) {
</p>
`
})
const previousUnlockAt = list.findLast(u => u.threshold <= endTs)?.threshold || 0
const previousUnlockAt = findLast(list, u => u.threshold <= endTs)?.threshold || 0
const nextUnlock = list.find(u => u.threshold > endTs)
if (nextUnlock) {
@ -3009,6 +3008,14 @@ function captureFileName(ext) {
function findLast(arr, predicate){
let i = arr.length
while(--i)
if(predicate(arr[i],i,arr)){
return arr[i]
}
}