Fix Not Logged In

Current version doesn't correctly identify login state. This change should correctly identify the state.
This commit is contained in:
Heartz66 2022-05-13 17:10:52 +02:00 committed by GitHub
parent 9a069e80fb
commit 90a9ee1aa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,7 +124,7 @@ SteamCommunity.prototype._checkCommunityError = function(html, callback) {
return err;
}
if (typeof html === 'string' && html.match(/g_steamID = false;/) && html.match(/<h1>Sign In<\/h1>/)) {
if (typeof html === 'string' && html.indexOf('g_steamID = false;') > -1 && html.indexOf('<div class="login_title">Sign In</div>') > -1) {
err = new Error("Not Logged In");
callback(err);
this._notifySessionExpired(err);