diff --git a/index.js b/index.js index 8269460..f6aa22b 100644 --- a/index.js +++ b/index.js @@ -458,12 +458,9 @@ SteamCommunity.prototype._myProfile = function(endpoint, form, callback) { } function completeRequest(url) { - var options = {}; - if (endpoint.endpoint) { - options = endpoint; - options.uri = "https://steamcommunity.com" + url + "/" + endpoint.endpoint; - options.method = "GET"; - } + var options = endpoint.endpoint ? endpoint : {}; + options.uri = "https://steamcommunity.com" + url + "/" + (endpoint.endpoint || endpoint); + options.method = "GET"; if (form) { options.method = "POST";