From cd90d7a5638d95a2ace7385843caee6a566d905f Mon Sep 17 00:00:00 2001 From: Alex Corn Date: Thu, 22 Jul 2021 03:25:47 -0400 Subject: [PATCH] Trim comments before returning them --- components/users.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/users.js b/components/users.js index 9c87ece..f598a2a 100644 --- a/components/users.js +++ b/components/users.js @@ -240,14 +240,14 @@ SteamCommunity.prototype.getUserComments = function(userID, options, callback) { return { id: $elem.attr("id").split("_")[1], author: { - id: new SteamID("[U:1:" + $elem.find("[data-miniprofile]").data("miniprofile") + "]"), + steamID: new SteamID("[U:1:" + $elem.find("[data-miniprofile]").data("miniprofile") + "]"), name: $elem.find("bdi").text(), avatar: $elem.find(".playerAvatar img[src]").attr("src"), state: $elem.find(".playerAvatar").attr("class").split(" ").pop() }, date: new Date($elem.find(".commentthread_comment_timestamp").data("timestamp") * 1000), - text: $commentContent.text(), - html: $commentContent.html() + text: $commentContent.text().trim(), + html: $commentContent.html().trim() } }).get();