From 5b43636f7c4369a06346fbfcab8b283369694be3 Mon Sep 17 00:00:00 2001 From: RyGuy Date: Wed, 29 Mar 2023 16:44:24 -0400 Subject: [PATCH 1/2] render giveaway description --- js/load-summary.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/load-summary.js b/js/load-summary.js index a9cf3d77..b8d7f839 100644 --- a/js/load-summary.js +++ b/js/load-summary.js @@ -30,6 +30,7 @@ function parseAndShowDocument(data, url) { var obj = JSON.parse(data.contents.split('&').join('&').split('<').join('<').split('>').join('>').split('\n').join('
')); var ended = new Date(obj.giveaway.end * 1000); var text = "

Giveaway Summary

" + + infoFormat("Description", obj.giveaway.desc) + infoFormat("Prize", obj.giveaway.prize) + infoFormat("Host", userFormat(obj.giveaway.host)) + infoFormat("Winners", obj.giveaway.num_winners) From 7572aabb1cc91366b3b023c645105eb01cf204f3 Mon Sep 17 00:00:00 2001 From: RyGuy Date: Wed, 29 Mar 2023 21:09:00 -0400 Subject: [PATCH 2/2] null check giveaway desc --- js/load-summary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/load-summary.js b/js/load-summary.js index b8d7f839..d4f1f795 100644 --- a/js/load-summary.js +++ b/js/load-summary.js @@ -30,7 +30,7 @@ function parseAndShowDocument(data, url) { var obj = JSON.parse(data.contents.split('&').join('&').split('<').join('<').split('>').join('>').split('\n').join('
')); var ended = new Date(obj.giveaway.end * 1000); var text = "

Giveaway Summary

" - + infoFormat("Description", obj.giveaway.desc) + + 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)