From 4052d8cab8963a3624435f2a8c601e977fafdb8a Mon Sep 17 00:00:00 2001 From: Stof <93355168+0x73746F66@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:31:39 +1100 Subject: [PATCH] fix: vex creation (#53) Co-authored-by: Christopher Langton --- functions/v1/issue/[uuid].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/v1/issue/[uuid].js b/functions/v1/issue/[uuid].js index 265e744..98f33c9 100644 --- a/functions/v1/issue/[uuid].js +++ b/functions/v1/issue/[uuid].js @@ -207,7 +207,7 @@ export async function onRequestGet(context) { seenAt = new Date().getTime() } const vexExist = finding.triage.some(t => t.analysisState === analysisState).length !== 0 - let vexData = finding.triage.filter(t => t.analysisState === analysisState).pop() + let vexData = finding.triage.filter(t => t.analysisState === analysisState).pop() || {} if (!vexExist) { vexData.analysisState = analysisState vexData.findingUuid = finding.uuid