From a7578d20f1c4db7b3755ae501816e9c11967a6d8 Mon Sep 17 00:00:00 2001 From: Victor Lin <13424970+victorlin@users.noreply.github.com> Date: Wed, 20 Nov 2024 17:23:37 -0800 Subject: [PATCH] Update conditions for optional properties Checking against undefined is more direct. --- src/util/entropyCreateStateFromJsons.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/entropyCreateStateFromJsons.ts b/src/util/entropyCreateStateFromJsons.ts index 7e7a4db84..f9d43e416 100644 --- a/src/util/entropyCreateStateFromJsons.ts +++ b/src/util/entropyCreateStateFromJsons.ts @@ -302,10 +302,10 @@ function cdsFromAnnotation( isWrapping: _isCdsWrapping(strand, segments), color: validColor(annotation.color) || defaultColor || '#000', } - if (typeof annotation.display_name === 'string') { + if (annotation.display_name !== undefined) { cds.displayName = annotation.display_name; } - if (typeof annotation.description === 'string') { + if (annotation.description !== undefined) { cds.description = annotation.description; } return cds