mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-03-14 15:00:07 +08:00
We never want to return a sharedfile without an owner
This commit is contained in:
parent
36e8c79d87
commit
bde2cafaf4
@ -137,10 +137,13 @@ SteamCommunity.prototype.getSteamSharedFile = function(sharedFileId, callback) {
|
||||
let ownerHref = $(".friendBlockLinkOverlay").attr()["href"];
|
||||
|
||||
Helpers.resolveVanityURL(ownerHref, (err, data) => { // This request takes <1 sec
|
||||
if (!err) {
|
||||
sharedfile.owner = new SteamID(data.steamID);
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
sharedfile.owner = new SteamID(data.steamID);
|
||||
|
||||
// Make callback when ID was resolved as otherwise owner will always be null
|
||||
callback(null, new CSteamSharedFile(this, sharedfile));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user