mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-24 14:06:16 -04:00
Automatic deploy 29009984
This commit is contained in:
parent
7375adc934
commit
0c6f20a687
4 changed files with 21 additions and 8 deletions
|
@ -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]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue