Skip to content

Commit 44b4b43

Browse files
authored
Merge pull request #3222 from CVEProject/jd-2911-error
Resolves #2911 Added check for edge case when providerMetadata fields aren't provided
2 parents d9ea50c + 2209cf6 commit 44b4b43

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/components/AdpVulnerabilityEnrichment.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,11 +406,14 @@ export default {
406406
}
407407
},
408408
getCveProgramReferences(){
409-
if (this.containerObject.providerMetadata.shortName.toLowerCase() !== useCveRecordLookupStore().cveProgramShortName) return;
409+
if (this.containerObject.providerMetadata.shortName?.toLowerCase() !== useCveRecordLookupStore().cveProgramShortName) return;
410410
this.cveProgramReferences = useCveRecordLookupStore().getReferences(this.containerObject.references);
411411
},
412412
getUpdatedDate() {
413-
this.dateUpdated = this.getDate(this.containerObject.providerMetadata.dateUpdated);
413+
if(this.containerObject.providerMetadata?.dateUpdated) {
414+
this.dateUpdated = this.getDate(this.containerObject.providerMetadata?.dateUpdated);
415+
}
416+
414417
},
415418
getDate(dateTime) {
416419
const [date] = dateTime.split('T');

0 commit comments

Comments
 (0)