Skip to content

Commit

Permalink
Fix AutoDL issue with new models not in cache (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec authored Jan 7, 2025
1 parent 93833cb commit fd9a534
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/update_manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ permissions:

# Limit concurrency per branch to prevent push issues.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
update-manifests:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zigbee-ota",
"version": "1.1.0",
"version": "1.1.1",
"repository": {
"type": "git",
"url": "git+https://github.com/Koenkk/zigbee-OTA.git"
Expand Down
6 changes: 5 additions & 1 deletion src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ export async function getText(manufacturer: string, pageUrl: string): Promise<st
return await response.text();
}

export function getLatestImage<T>(list: T[], compareFn: (a: T, b: T) => number): T | undefined {
export function getLatestImage<T>(list: T[] | undefined, compareFn: (a: T, b: T) => number): T | undefined {
if (!list) {
return undefined;
}

const sortedList = list.sort(compareFn);

return sortedList.slice(0, sortedList.length > 1 && process.env.PREV ? -1 : undefined).pop();
Expand Down

0 comments on commit fd9a534

Please sign in to comment.