steamutils 1.2.65 → 1.2.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -6
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5553,7 +5553,7 @@ class SteamUser {
5553
5553
 
5554
5554
  const peopleEl = tradehistory_event_description_el.find('a[href]')
5555
5555
  const profileURL = peopleEl.attr('href');
5556
- if (profileURL.startsWith("https://steamcommunity.com/profiles/") || profileURL.startsWith("https://steamcommunity.com/id/")) {
5556
+ if (profileURL && (profileURL.startsWith("https://steamcommunity.com/profiles/") || profileURL.startsWith("https://steamcommunity.com/id/"))) {
5557
5557
  tradePeople = {
5558
5558
  name: peopleEl.text().trim(),
5559
5559
  url: profileURL
@@ -5562,13 +5562,10 @@ class SteamUser {
5562
5562
 
5563
5563
  if (!descriptions.includes(description)) {
5564
5564
  if (description.startsWith("You traded with ")) {
5565
- const peopleEl = tradehistory_event_description_el.find('a[href]')
5566
5565
  description = "You traded with"
5567
5566
  } else if (description.startsWith("Gift sent to and redeemed by ")) {
5568
- const peopleEl = tradehistory_event_description_el.find('a[href]')
5569
5567
  description = "Gift sent to and redeemed by"
5570
5568
  } else if (description.startsWith("Your trade with ") && description.endsWith(" was on hold, and the trade has now completed.")) {
5571
- const peopleEl = tradehistory_event_description_el.find('a[href]')
5572
5569
  description = "Your trade with friend was on hold, and the trade has now completed."
5573
5570
  } else if (description.startsWith("You listed an item on the Community Market. The listing was placed on hold until")) {
5574
5571
  //You listed an item on the Community Market. The listing was placed on hold until 24 Jan @ 3:06am.
@@ -5578,11 +5575,9 @@ class SteamUser {
5578
5575
  description = "Earned in game"
5579
5576
  } else if (description.startsWith("Refunded a gift because the recipient,") && description.endsWith("declined")) {
5580
5577
  //Refunded a gift because the recipient, Ava, declined
5581
- const peopleEl = tradehistory_event_description_el.find('a[href]')
5582
5578
  description = "Refunded a gift because the recipient declined"
5583
5579
  } else if (description.startsWith("Your held trade with") && description.endsWith("was canceled. The items have been returned to you.")) {
5584
5580
  //Your held trade with TrQuBach96 was canceled. The items have been returned to you.
5585
- const peopleEl = tradehistory_event_description_el.find('a[href]')
5586
5581
  description = "Your held trade with person was canceled. The items have been returned to you."
5587
5582
  } else {
5588
5583
  console.log("== Description ==");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.2.65",
3
+ "version": "1.2.66",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "axios": "^1.5.1",