Skip to content

Commit 40d9de1

Browse files
MIDRC-550 Replace nested empty values with 'null' in explorer display (#1468)
1 parent 068f5c6 commit 40d9de1

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/GuppyDataExplorer/ExplorerTable/index.jsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,13 @@ class ExplorerTable extends React.Component {
7676
const nestedChildFieldName = fieldStringsArray.slice(1, fieldStringsArray.length).join('.');
7777
// some logic to handle depends on wether the child field in raw data is an array or not
7878
if (_.isArray(row.value)) {
79-
valueStr = row.value.map((x) => _.get(x, nestedChildFieldName)).join(', ');
79+
valueStr = row.value.map((x) => {
80+
let val = _.get(x, nestedChildFieldName);
81+
// replace empty, null and undefined nested values with explicit "null" strings
82+
// so that we can still display 1 value per nested row
83+
if (val == null || val === '') val = 'null';
84+
return val;
85+
}).join(', ');
8086
} else {
8187
valueStr = _.get(row.value, nestedChildFieldName);
8288
}

src/Workspace/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ class Workspace extends React.Component {
323323
this.checkWorkspaceStatus();
324324
break;
325325
default:
326-
message.error('There is an error when trying to launch your workspace');
326+
message.error('There was an error when trying to launch your workspace');
327327
this.setState({
328328
workspaceID: null,
329329
workspaceLaunchStepsConfig: null,

0 commit comments

Comments
 (0)