Skip to content

Commit

Permalink
Merge pull request #22 from AuroPick/development
Browse files Browse the repository at this point in the history
v4.0.2
  • Loading branch information
AuroPick committed Oct 8, 2023
2 parents 5471a8f + d340fae commit 8e4b064
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "epic-free-games",
"version": "4.0.1",
"version": "4.0.2",
"description": "Get weekly Epic Games free games",
"main": "dist",
"types": "dist",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/epic-free-games/epic-free-games.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class EpicFreeGames {

private readonly epicGames: EpicGames

constructor(options: EpicFreeGamesOptions) {
constructor(options: EpicFreeGamesOptions = {}) {
this.epicFreeGamesUtil = new EpicFreeGamesUtil(options)
this.epicGames = new EpicGames()
}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/epic-free-games/epic-free-games.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class EpicFreeGamesUtil {
locale: 'en-US'
}

constructor(options: EpicFreeGamesOptions) {
constructor(options: EpicFreeGamesOptions = {}) {
this.options = deepmerge(this.options, options)
}

Expand Down
6 changes: 3 additions & 3 deletions src/modules/epic-free-games/types/epic-free-games.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ export interface EpicFreeGamesOptions {
/**
* price and currency will change according to this value
*/
readonly country: Country
readonly country?: Country
/**
* include all offers like DLC's or hidden games
*/
readonly includeAll: boolean
readonly includeAll?: boolean
/**
* localization will change according to this value
*/
readonly locale: Locale
readonly locale?: Locale
}

export interface GetGames {
Expand Down
2 changes: 1 addition & 1 deletion src/modules/epic-games/epic-games.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class EpicGames {
}
)

if (data?.errors)
if (data?.errors && !data?.data?.Catalog?.searchStore)
throw new Error(
`An error occurred
error: ${data.errors.map((err: any) =>
Expand Down

0 comments on commit 8e4b064

Please sign in to comment.