I'm encountering an error due to the scope issue with 'this', and I'm struggling to find a solution. I attempted using the fat arrow, which solved the scope problem but created another issue where I lack a callback value that needs to be utilized. Below is the snippet of my code:
this.checkIfDatabaseIsLocked(function(res) {
//If true database is locked
console.log("result checkIfDatabaseIsLocked: " + res);
if (res) {
return;
}
//LockDatabase
this.lockDatabase().then(
result => {
Any suggestions on how to overcome this challenge? Thank you in advance!!!