mirror of
https://github.com/msoedov/agentic_security.git
synced 2026-11-28 04:53:28 +01:00
Add missing error handling in main.js (acceptConsent)
This commit is contained in:
1 parent
4332e4affd
commit
e171f0216e
1 file changed
+6
-1
@@ -130,7 +130,12 @@ var app = new Vue({
|
||||
},
|
||||
acceptConsent() {
|
||||
this.showConsentModal = false; // Close the modal
|
||||
localStorage.setItem('consentGiven', 'true'); // Save consent to local storage
|
||||
|
||||
try {
|
||||
localStorage.setItem('consentGiven', 'true'); // Save consent to local storage
|
||||
} catch (e) {
|
||||
this.showToast('Failed to save consent', 'error'); // Show error if saving fails
|
||||
}
|
||||
},
|
||||
|
||||
saveStateToLocalStorage() {
|
||||
|
||||
Reference in new issue
Block a user