Skip to content

Commit 4912bf7

Browse files
authored
Fix show more documents code lens argument passing (#82)
1 parent 2a7c99e commit 4912bf7

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,10 @@
431431
"command": "mdb.createNewPlaygroundFromViewAction",
432432
"when": "false"
433433
},
434+
{
435+
"command": "mdb.showActiveConnectionInPlayground",
436+
"when": "false"
437+
},
434438
{
435439
"command": "mdb.copyConnectionString",
436440
"when": "false"

src/editors/collectionDocumentsCodeLensProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default class CollectionDocumentsCodeLensProvider implements vscode.CodeL
8989
title: commandTitle,
9090
tooltip: commandTooltip,
9191
command: 'mdb.codeLens.showMoreDocumentsClicked',
92-
arguments: [operationId, connectionId, namespace]
92+
arguments: [{ operationId, connectionId, namespace }]
9393
};
9494

9595
return codeLens;

src/editors/documentProvider.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ export default class DocumentViewProvider implements vscode.TextDocumentContentP
4141
// Ensure we're still connected to the correct connection.
4242
if (connectionId !== this._connectionController.getActiveConnectionId()) {
4343
vscode.window.showErrorMessage(
44-
`Unable to list documents: no longer connected to ${connectionId}`
44+
`Unable to fetch document: no longer connected to ${connectionId}`
4545
);
4646
return reject(
4747
new Error(
48-
`Unable to list documents: no longer connected to ${connectionId}`
48+
`Unable to fetch document: no longer connected to ${connectionId}`
4949
)
5050
);
5151
}

src/mdbExtensionController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export default class MDBExtensionController implements vscode.Disposable {
154154
registerEditorCommands(): void {
155155
this.registerCommand(
156156
'mdb.codeLens.showMoreDocumentsClicked',
157-
(operationId, connectionId, namespace) => {
157+
({ operationId, connectionId, namespace }) => {
158158
return this._editorsController.onViewMoreCollectionDocuments(
159159
operationId,
160160
connectionId,

0 commit comments

Comments
 (0)