mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2026-08-19 05:03:28 +08:00
Fixed errors not being handled in getTradeURL
This commit is contained in:
5
index.js
5
index.js
@@ -372,6 +372,11 @@ SteamCommunity.prototype.loggedIn = function(callback) {
|
||||
|
||||
SteamCommunity.prototype.getTradeURL = function(callback) {
|
||||
this._myProfile("/tradeoffers/privacy", null, (err, response, body) => {
|
||||
if (err) {
|
||||
callback(err);
|
||||
return;
|
||||
}
|
||||
|
||||
var match = body.match(/https?:\/\/(www.)?steamcommunity.com\/tradeoffer\/new\/?\?partner=\d+(&|&)token=([a-zA-Z0-9-_]+)/);
|
||||
if (match) {
|
||||
var token = match[3];
|
||||
|
||||
Reference in New Issue
Block a user