From cb4ddea7a4dd563e24cadc69e91cc47bd883f20b Mon Sep 17 00:00:00 2001 From: Phil Reese Date: Mon, 16 Oct 2023 13:17:39 -0400 Subject: [PATCH] feat: gracefully handle commented subject id in URL query param --- .../eregs-vite/src/views/PolicyRepository.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/solution/ui/regulations/eregs-vite/src/views/PolicyRepository.vue b/solution/ui/regulations/eregs-vite/src/views/PolicyRepository.vue index 36bd4de458..a457fa891b 100644 --- a/solution/ui/regulations/eregs-vite/src/views/PolicyRepository.vue +++ b/solution/ui/regulations/eregs-vite/src/views/PolicyRepository.vue @@ -188,11 +188,13 @@ const setSelectedParams = (subjectsListRef) => (param) => { (subjectObj) => paramId === subjectObj.id.toString() )[0]; - addSelectedParams({ - type: paramType, - id: paramId, - name: getSubjectName(subject), - }); + if (subject) { + addSelectedParams({ + type: paramType, + id: paramId, + name: getSubjectName(subject), + }); + } }); };