diff --git a/frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx b/frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx index 84cefc0037..ab4d65a60f 100644 --- a/frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx +++ b/frontend/javascripts/dashboard/dataset/dataset_settings_data_tab.tsx @@ -52,9 +52,7 @@ export const syncDataSourceFields = ( // Copy from simple to advanced: update json const dataSourceFromSimpleTab = form.getFieldValue("dataSource"); if (syncDatasetName) { - if (dataSourceFromSimpleTab.id == null) { - dataSourceFromSimpleTab.id = {}; - } + dataSourceFromSimpleTab.id ??= {}; dataSourceFromSimpleTab.id.name = form.getFieldValue(["dataset", "name"]); } form.setFieldsValue({