From 203c2c03ce649f54ee990489d9ac231f5bac0eda Mon Sep 17 00:00:00 2001
From: Cristiano Magro <cristiano.magro@vola.it>
Date: Tue, 07 Jan 2025 18:26:30 +0100
Subject: [PATCH] Deleting Items

---
 10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue b/10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue
index 0e1aec5..8afc81b 100644
--- a/10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue
+++ b/10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue
@@ -75,10 +75,10 @@
       this.selectedTab = 'stored-resources';
     },
     removeResource(resId) {
-      this.storedResouces = this.storedResouces.filter(
-        (res) => res.id !== resId
+      const resIndex = this.storedResouces.findIndex(
+        (res) => res.id === resId
       );
-      console.log(this.storedResouces.length);
+      this.storedResouces.splice(resIndex, 1);
     },
   },
 };

--
Gitblit v1.8.0