Driveby: getItem(x) vs getItems()[x]

This commit is contained in:
Bryan Ashby 2023-02-17 20:53:57 -07:00
parent 69cb0c5907
commit 2aec375bee
No known key found for this signature in database
GPG Key ID: C2C1B501E4EFD994
1 changed files with 4 additions and 4 deletions

View File

@ -116,7 +116,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
); );
if (nodeStatusSelectionView) { if (nodeStatusSelectionView) {
const item = nodeStatusView.getItems()[index]; const item = nodeStatusView.getItem(index);
this._updateNodeStatusSelection(nodeStatusSelectionView, item); this._updateNodeStatusSelection(nodeStatusSelectionView, item);
} }
} }
@ -200,7 +200,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
if (nodeStatusView && nodeStatusSelectionView) { if (nodeStatusView && nodeStatusSelectionView) {
nodeStatusView.on('index update', index => { nodeStatusView.on('index update', index => {
const item = nodeStatusView.getItems()[index]; const item = nodeStatusView.getItem(index);
this._updateNodeStatusSelection( this._updateNodeStatusSelection(
nodeStatusSelectionView, nodeStatusSelectionView,
item item
@ -405,7 +405,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
if (nodeStatusSelectionView) { if (nodeStatusSelectionView) {
const nodeStatusView = this.getView('main', MciViewIds.main.nodeStatus); const nodeStatusView = this.getView('main', MciViewIds.main.nodeStatus);
if (nodeStatusView) { if (nodeStatusView) {
const item = nodeStatusView.getItems()[this.selectedNodeStatusIndex]; const item = nodeStatusView.getItem(this.selectedNodeStatusIndex);
this._updateNodeStatusSelection(nodeStatusSelectionView, item); this._updateNodeStatusSelection(nodeStatusSelectionView, item);
} }
} }
@ -596,7 +596,7 @@ exports.getModule = class WaitingForCallerModule extends MenuModule {
MciViewIds.main.selectedNodeStatusInfo MciViewIds.main.selectedNodeStatusInfo
); );
if (nodeStatusSelectionView) { if (nodeStatusSelectionView) {
const item = nodeStatusView.getItems()[0]; const item = nodeStatusView.getItem(0);
this._updateNodeStatusSelection(nodeStatusSelectionView, item); this._updateNodeStatusSelection(nodeStatusSelectionView, item);
} }
} }