From 75709a1168308b5922f2e6e3a3acb05f0308be1f Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 14 Sep 2023 11:55:45 +0200 Subject: [PATCH] fix: avoid adding script if data is missing --- views/profile.pug | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/views/profile.pug b/views/profile.pug index 95db723..c96dc3e 100644 --- a/views/profile.pug +++ b/views/profile.pug @@ -37,10 +37,11 @@ mixin generatePersona(persona, isPrimary) p Proof link: not accessible from browser block content - script. - kx = { - publicKey: !{JSON.stringify(data.publicKey)} - } + if (data && 'publicKey' in data) + script. + kx = { + publicKey: !{JSON.stringify(data.publicKey)} + } if (data && 'errors' in data && data.errors.length > 0) section