Skip to content

Commit 0dbebfc

Browse files
committed
refactor: remove null coalescing operator from table wrapper queries
1 parent 7cd6f1f commit 0dbebfc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

log-viewer/src/features/database/components/DMLView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ export class DMLView extends LitElement {
170170
}
171171

172172
get _dmlTableWrapper(): HTMLDivElement | null {
173-
return this.renderRoot?.querySelector('#db-dml-table') ?? null;
173+
return this.renderRoot?.querySelector('#db-dml-table');
174174
}
175175

176176
_appendTableWhenVisible() {
@@ -183,7 +183,7 @@ export class DMLView extends LitElement {
183183
const tableWrapper = this._dmlTableWrapper;
184184
if (tableWrapper && treeRoot && isVisible) {
185185
const dbAccess = await DatabaseAccess.create(treeRoot);
186-
this.dmlLines = dbAccess.getDMLLines() || [];
186+
this.dmlLines = dbAccess.getDMLLines();
187187

188188
Tabulator.registerModule(Object.values(CommonModules));
189189
Tabulator.registerModule([

log-viewer/src/features/database/components/SOQLView.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class SOQLView extends LitElement {
7272
blockClearHighlights = true;
7373

7474
get _soqlTableWrapper(): HTMLDivElement | null {
75-
return this.renderRoot?.querySelector('#db-soql-table') ?? null;
75+
return this.renderRoot?.querySelector('#db-soql-table');
7676
}
7777

7878
constructor() {
@@ -211,7 +211,7 @@ export class SOQLView extends LitElement {
211211
const treeRoot = this.timelineRoot;
212212
const tableWrapper = this._soqlTableWrapper;
213213
if (tableWrapper && treeRoot && isVisible) {
214-
this.soqlLines = (await DatabaseAccess.create(treeRoot)).getSOQLLines() || [];
214+
this.soqlLines = (await DatabaseAccess.create(treeRoot)).getSOQLLines();
215215

216216
Tabulator.registerModule(Object.values(CommonModules));
217217
Tabulator.registerModule([

0 commit comments

Comments
 (0)