Skip to content

Commit

Permalink
render giveaway description (#232)
Browse files Browse the repository at this point in the history
* render giveaway description

* null check giveaway desc
  • Loading branch information
TheRealRyGuy authored Jul 5, 2024
1 parent 1c688da commit d92ebec
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/load-summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function parseAndShowDocument(data, url) {
var obj = JSON.parse(data.contents.split('&').join('&amp;').split('<').join('&lt;').split('>').join('&gt;').split('\n').join('<br>'));
var ended = new Date(obj.giveaway.end * 1000);
var text = "<h2>Giveaway Summary</h2>"
+ obj.giveaway.desc == null ? "" : infoFormat("Description", obj.giveaway.desc)
+ infoFormat("Prize", obj.giveaway.prize)
+ infoFormat("Host", userFormat(obj.giveaway.host))
+ infoFormat("Winners", obj.giveaway.num_winners)
Expand Down

0 comments on commit d92ebec

Please sign in to comment.