From 50fb4e45f53bb5540187a143b74433a424b1999c Mon Sep 17 00:00:00 2001 From: Agus Hilman Date: Tue, 21 May 2024 18:31:40 +0700 Subject: [PATCH] OC-22822 Fixed Form ID and Form version not displayed --- jsapp/js/assetParserUtils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/jsapp/js/assetParserUtils.ts b/jsapp/js/assetParserUtils.ts index 0b45f465f5..a4f72ea00c 100644 --- a/jsapp/js/assetParserUtils.ts +++ b/jsapp/js/assetParserUtils.ts @@ -16,12 +16,15 @@ function parseSettings(asset: AssetResponse) { let foundSettings: AssetContentSettings = {}; if (Array.isArray(settings) && settings.length) { foundSettings = settings[0]; + } else { + foundSettings = settings; } return { unparsed__settings: foundSettings, - settings__style: foundSettings.style, - settings__form_id: foundSettings.form_id, settings__title: foundSettings.title, + settings__style: foundSettings.style !== undefined ? foundSettings.style : '', + settings__form_id: foundSettings.form_id !== undefined ? foundSettings.form_id : (foundSettings.id_string !== undefined ? foundSettings.id_string : ''), + settings__version: foundSettings.version !== undefined ? foundSettings.version : '', }; } else { return {};