mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-19 20:19:14 +00:00
fix(LocalAuth): logout method (#1267)
The logout method was trying to use a function call passing the "dataDir" as the "this" reference
This commit is contained in:
@@ -44,7 +44,7 @@ class LocalAuth extends BaseAuthStrategy {
|
|||||||
|
|
||||||
async logout() {
|
async logout() {
|
||||||
if (this.userDataDir) {
|
if (this.userDataDir) {
|
||||||
return (fs.rmSync ? fs.rmSync : fs.rmdirSync).call(this.userDataDir, { recursive: true });
|
return (fs.rmSync ? fs.rmSync : fs.rmdirSync).call(this, this.userDataDir, { recursive: true });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user