Merge pull request #184 from nemanjaASE/issue-174-missing-error-handling

Add missing error handling in main.js (acceptConsent)
This commit is contained in:
Alexander Myasoedov
2025-03-13 18:35:43 +02:00
committed by GitHub
+6 -1
View File
@@ -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() {