mirror of
https://github.com/DoctorMcKay/node-steamcommunity.git
synced 2025-02-06 12:19:14 +08:00
Fix infinite loop in getWebApiKey
Fix infinite loop in getWebApiKey when trying to get web api key on account without email address confirmed
This commit is contained in:
parent
0ab3a94493
commit
0eb27a15d2
@ -14,6 +14,10 @@ SteamCommunity.prototype.getWebApiKey = function(domain, callback) {
|
||||
if(body.match(/<h2>Access Denied<\/h2>/)) {
|
||||
return callback(new Error("Access Denied"));
|
||||
}
|
||||
|
||||
if(body.match(/You must have a validated email address to create a Steam Web API key./)) {
|
||||
return callback(new Error("You must have a validated email address to create a Steam Web API key."));
|
||||
}
|
||||
|
||||
var match = body.match(/<p>Key: ([0-9A-F]+)<\/p>/);
|
||||
if(match) {
|
||||
|
Loading…
Reference in New Issue
Block a user