1
0
mirror of https://github.com/sasjs/adapter.git synced 2025-12-11 01:14:36 +00:00

fix: login not working on non english browsers

This commit is contained in:
Mihajlo Medjedovic
2020-08-23 18:17:35 +02:00
parent a006ead205
commit de426c9a92

View File

@@ -291,7 +291,7 @@ export default class SASjs {
public async checkSession() {
const loginResponse = await fetch(this.loginUrl.replace(".do", ""));
const responseText = await loginResponse.text();
const isLoggedIn = /You have signed in./gm.test(responseText);
const isLoggedIn = /<button.+onClick.+logout/gm.test(responseText);
return Promise.resolve({
isLoggedIn,