From 437c3542242f0ca68fd425cc7f732b32a14e73c6 Mon Sep 17 00:00:00 2001 From: Dan Mihaila Date: Tue, 10 Oct 2023 14:41:54 +0300 Subject: [PATCH] HDX-9232 wrong resource to be previewed on dataset page and on contribute form --- .../hdx_theme/fanstatic/contribute_flow/contribute_flow_main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/contribute_flow/contribute_flow_main.js b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/contribute_flow/contribute_flow_main.js index 8344ec6921..e9baa04e77 100644 --- a/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/contribute_flow/contribute_flow_main.js +++ b/ckanext-hdx_theme/ckanext/hdx_theme/fanstatic/contribute_flow/contribute_flow_main.js @@ -429,7 +429,7 @@ var i = 'first_resource'; $.each(newOptions, function (index, value) { var resName = value.get('name') ? value.get('name') : 'Resource ' + (index + 1); - if (value.get('dataset_preview_enabled') === true || value.get('dataset_preview_enabled') === 'True' || value.get('dataset_preview_enabled') === 'true') { + if (value.get('dataset_preview_enabled') === true) { selectOptions[selectOptions.length] = new Option(resName, index + '', true, true); i = index + ''; } else {