Skip to content

Commit

Permalink
fix: handle null case
Browse files Browse the repository at this point in the history
Co-authored-by: Vlad Frangu <me@vladfrangu.dev>
  • Loading branch information
imnaiyar and vladfrangu authored Nov 4, 2024
1 parent 015d962 commit 7faf350
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PartialGroupDMChannel extends BaseChannel {
* The timestamp when the last pinned message was pinned, if there was one
* @type {?number}
*/
this.lastPinTimestamp = Date.parse(data.last_pin_timestamp);
this.lastPinTimestamp = data.last_pin_timestamp ? Date.parse(data.last_pin_timestamp) : null;
} else {
this.lastPinTimestamp ??= null;
}
Expand Down

0 comments on commit 7faf350

Please sign in to comment.