mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-01-01 09:34:37 +08:00
Added some more explicit error handling if we try to do things while logged out
This commit is contained in:
parent
238a36de0f
commit
eb609b5c42
@ -219,6 +219,12 @@ SteamCommunity.prototype.uploadAvatar = function(image, format, callback) {
|
|||||||
format = null;
|
format = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// are we logged in?
|
||||||
|
if (!this.steamID) {
|
||||||
|
callback(new Error("Not Logged In"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
if(image instanceof Buffer) {
|
if(image instanceof Buffer) {
|
||||||
|
Loading…
Reference in New Issue
Block a user