Skip to content

Commit bb8f48e

Browse files
committed
fix: BulkEdits - null handling for impacted objects
1 parent 403bd9b commit bb8f48e

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/components/bulkEdits/BulkEdits.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
199199
renderCodeEditorHeader = () => {
200200
return (
201201
<div className="flex bg__primary px-20 py-8 dc__border-bottom dc__content-space">
202-
<div className='flexbox dc__gap-12'>
202+
<div className="flexbox dc__gap-12">
203203
<Button
204204
text="Run"
205205
onClick={this.handleRunButton}
@@ -216,11 +216,11 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
216216
></Button>
217217
</div>
218218

219-
{!this.state.showExamples ? (
220-
<div className="cb-5 fw-6 fs-13 pointer" onClick={() => this.setState({ showExamples: true })}>
221-
See Samples
222-
</div>
223-
) : null}
219+
{!this.state.showExamples ? (
220+
<div className="cb-5 fw-6 fs-13 pointer" onClick={() => this.setState({ showExamples: true })}>
221+
See Samples
222+
</div>
223+
) : null}
224224
</div>
225225
)
226226
}
@@ -279,7 +279,10 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
279279
name={OutputObjectTabs.IMPACTED_OBJECTS}
280280
/>
281281
</div>
282-
<div className="bulk-output-body cn-9 fs-13 p-20 dc__overflow-auto flexbox-col flex-grow-1 mh-0" data-testid="output-message">
282+
<div
283+
className="bulk-output-body cn-9 fs-13 p-20 dc__overflow-auto flexbox-col flex-grow-1 mh-0"
284+
data-testid="output-message"
285+
>
283286
{this.state.showOutputData ? (
284287
this.state.statusCode === 404 ? (
285288
<>{STATUS.ERROR}</>
@@ -345,7 +348,7 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
345348
<div>
346349
<div>
347350
*DEPLOYMENT TEMPLATE: <br /> <br />
348-
{this.state.impactedObjects.deploymentTemplate.length === 0 ? (
351+
{!this.state.impactedObjects.deploymentTemplate?.length ? (
349352
<>No Result Found</>
350353
) : (
351354
<>
@@ -372,7 +375,7 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
372375
<div>
373376
<div>
374377
*SECRETS: <br /> <br />
375-
{this.state.impactedObjects.secret.length === 0 ? (
378+
{!this.state.impactedObjects.secret?.length ? (
376379
<>No Result Found</>
377380
) : (
378381
<>
@@ -509,7 +512,6 @@ export default class BulkEdits extends Component<BulkEditsProps, BulkEditsState>
509512
)
510513
}
511514

512-
513515
renderBulkEditBody = () => {
514516
return !this.state.showExamples ? this.renderBulkCodeEditor() : this.renderCodeEditorAndReadme()
515517
}

0 commit comments

Comments
 (0)