Fix: Cannot read properties of undefined (reading 'features') // original: (#1407) (#1410)

* Fix: Cannot read properties of undefined (reading 'features') (#1407)

* Fix: Cannot read properties of undefined (reading 'features')

Find MD backend without features

* Fix for tests

* Update Client.js

* Update LegacySessionAuth.js

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
Rajeh Taher
2022-04-22 00:15:00 +03:00
committed by GitHub
parent 3a2acf71c2
commit 5e2e9dd139
3 changed files with 7 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ class LegacySessionAuth extends BaseAuthStrategy {
async getAuthEventPayload() {
const isMD = await this.client.pupPage.evaluate(() => {
return window.Store.Features.features.MD_BACKEND;
return window.Store.MDBackend;
});
if(isMD) throw new Error('Authenticating via JSON session is not supported for MultiDevice-enabled WhatsApp accounts.');
@@ -69,4 +69,4 @@ class LegacySessionAuth extends BaseAuthStrategy {
}
}
module.exports = LegacySessionAuth;
module.exports = LegacySessionAuth;