Skip to content

Commit

Permalink
chore(Entitlement): mark ends_at as nullable`
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Nov 15, 2024
1 parent a67c7af commit a27cd9c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/discord.js/src/structures/Entitlement.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,9 @@ class Entitlement extends Base {
if ('ends_at' in data) {
/**
* The timestamp at which this entitlement is no longer valid
* <info>This is only `null` for test entitlements</info>
* @type {?number}
*/
this.endsTimestamp = Date.parse(data.ends_at);
this.endsTimestamp = data.ends_at ? Date.parse(data.ends_at) : null;
} else {
this.endsTimestamp ??= null;
}
Expand Down Expand Up @@ -123,7 +122,6 @@ class Entitlement extends Base {

/**
* The end date at which this entitlement is no longer valid
* <info>This is only `null` for test entitlements</info>
* @type {?Date}
*/
get endsAt() {
Expand Down

0 comments on commit a27cd9c

Please sign in to comment.