Skip to content

Commit c7ee3c7

Browse files
authored
Merge pull request #2 from bradleytechman/main
2 parents 6bd65ed + ef779d7 commit c7ee3c7

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

source/utils/app.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@ export class App {
1717
featured: boolean
1818
latest_version: string
1919
other_versions: string[]
20+
screenshots: string[]
2021
description: string
2122
short_description: string
2223
category: string
24+
2325
constructor(app: any) {
24-
this.name = app['name']
25-
this.icon = app['icon']
26-
this.plist = app['plist']
27-
this.developer = app['dev']
28-
this.featured = app['featured']
29-
this.latest_version = app['version']
30-
this.other_versions = app['other_versions']
31-
this.description = app['description']
32-
this.short_description = app['short-description']
33-
this.category = app['category']
26+
this.name = app['name'] ?? ''
27+
this.icon = app['icon'] ?? ''
28+
this.plist = app['plist'] ?? ''
29+
this.developer = app['dev'] ?? ''
30+
this.featured = app['featured'] ?? false
31+
this.latest_version = app['version'] ?? ''
32+
this.other_versions = app['other_versions'] ?? []
33+
this.screenshots = app['screenshots'] ?? []
34+
this.description = app['description'] ?? ''
35+
this.short_description = app['short-description'] ?? ''
36+
this.category = app['category'] ?? 'other'
3437
}
3538
}
3639

0 commit comments

Comments
 (0)