Skip to content

Commit

Permalink
Patch filter
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Oct 11, 2024
1 parent d356659 commit 19ee95d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,14 @@ function normalizeItem(self, item, bioEngineConfigs) {
)
)
continue;
const linked = self.resourceItems.filter(
item => item.id.toLowerCase() === link_key.toLowerCase()
);
const linked = self.resourceItems.filter(item => {
try {
return item.id.toLowerCase() === link_key.toLowerCase();
} catch (e) {
console.error("Invalid item found: ", item);
return false;
}
});
for (let lit of linked) {
item.apps.unshift({
Expand Down Expand Up @@ -659,6 +664,8 @@ function normalizeItem(self, item, bioEngineConfigs) {
});
}
}
console.log("================>id", item.id);
return item;
}
Expand Down Expand Up @@ -922,7 +929,6 @@ export default {
}
delete item.badges;
Object.assign(item, normalizeItem(this, item, this.bioEngineConfigs));
item.links = item.links || [];
// add training data
if (item.training_data) {
Expand Down

0 comments on commit 19ee95d

Please sign in to comment.