steamutils 1.4.99 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
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",