Просмотр исходного кода

updated the code for fixing the anyone can delete old rules

for old cases email was null so all the rules could be deleted directly,
rota3015 8 месяцев назад
Родитель
Сommit
34910f3a34
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      assets/js/vue.rules.js

+ 1 - 1
assets/js/vue.rules.js

@@ -540,7 +540,7 @@ const app = Vue.createApp({
           edit_history: resultArray
         }
 
-        if (rule.email == localStorage.getItem('userEmail')) {
+        if (rule.email != null && rule.email != undefined && rule.email == localStorage.getItem('userEmail')) {
           this.isOwner = true;
           this.isAdmin = true; // this will allow the user to delete his own rules
         }