Skip to content

Commit

Permalink
Merge pull request #3222 from CVEProject/jd-2911-error
Browse files Browse the repository at this point in the history
Resolves #2911 Added check for edge case when providerMetadata fields aren't provided
  • Loading branch information
athu-tran authored Nov 19, 2024
2 parents d9ea50c + 2209cf6 commit 44b4b43
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/AdpVulnerabilityEnrichment.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,14 @@ export default {
}
},
getCveProgramReferences(){
if (this.containerObject.providerMetadata.shortName.toLowerCase() !== useCveRecordLookupStore().cveProgramShortName) return;
if (this.containerObject.providerMetadata.shortName?.toLowerCase() !== useCveRecordLookupStore().cveProgramShortName) return;
this.cveProgramReferences = useCveRecordLookupStore().getReferences(this.containerObject.references);
},
getUpdatedDate() {
this.dateUpdated = this.getDate(this.containerObject.providerMetadata.dateUpdated);
if(this.containerObject.providerMetadata?.dateUpdated) {
this.dateUpdated = this.getDate(this.containerObject.providerMetadata?.dateUpdated);
}
},
getDate(dateTime) {
const [date] = dateTime.split('T');
Expand Down

0 comments on commit 44b4b43

Please sign in to comment.