Skip to content

Commit

Permalink
chore(Entitlement): mark startsTimestamp as nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
sdanialraza committed Nov 24, 2024
1 parent b9d12c7 commit 080e537
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 @@ -73,10 +73,9 @@ class Entitlement extends Base {
if ('starts_at' in data) {
/**
* The timestamp at which this entitlement is valid
* <info>This is only `null` for test entitlements</info>
* @type {?number}
*/
this.startsTimestamp = Date.parse(data.starts_at);
this.startsTimestamp = data.starts_at ? Date.parse(data.starts_at) : null;
} else {
this.startsTimestamp ??= null;
}
Expand Down Expand Up @@ -113,7 +112,6 @@ class Entitlement extends Base {

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

0 comments on commit 080e537

Please sign in to comment.