steamutils 1.4.99 → 1.5.1

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 +6 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -5976,10 +5976,14 @@ export default class SteamUser {
5976
5976
  }
5977
5977
 
5978
5978
  async uploadAvatar(filePath) {
5979
+ if (typeof filePath !== "string") {
5980
+ console.error("Invalid file path", filePath);
5981
+ return;
5982
+ }
5979
5983
  let deleteFile = false;
5980
- if (typeof filePath === "string" && filePath.startsWith("http")) {
5984
+ if (filePath.startsWith("http")) {
5981
5985
  deleteFile = true;
5982
- filePath = await downloadImage(url, `TempImg_${Date.now()}.png`);
5986
+ filePath = await downloadImage(filePath, `TempImg_${Date.now()}.png`);
5983
5987
  if (!filePath) {
5984
5988
  return;
5985
5989
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "steamutils",
3
- "version": "1.4.99",
3
+ "version": "1.5.01",
4
4
  "main": "index.js",
5
5
  "dependencies": {
6
6
  "alpha-common-utils": "^1.0.6",