Skip to content

Commit e1c95bd

Browse files
chore: initialise cursor variables
1 parent e3a87b3 commit e1c95bd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/tools/mongodb/read/aggregate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export class AggregateTool extends MongoDBToolBase {
3535
{ database, collection, pipeline, responseBytesLimit }: ToolArgs<typeof this.argsShape>,
3636
{ signal }: ToolExecutionContext
3737
): Promise<CallToolResult> {
38-
let aggregationCursor: AggregationCursor | undefined;
38+
let aggregationCursor: AggregationCursor | undefined = undefined;
3939
try {
4040
const provider = await this.ensureConnected();
4141

src/tools/mongodb/read/find.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class FindTool extends MongoDBToolBase {
4848
{ database, collection, filter, projection, limit, sort, responseBytesLimit }: ToolArgs<typeof this.argsShape>,
4949
{ signal }: ToolExecutionContext
5050
): Promise<CallToolResult> {
51-
let findCursor: FindCursor<unknown> | undefined;
51+
let findCursor: FindCursor<unknown> | undefined = undefined;
5252
try {
5353
const provider = await this.ensureConnected();
5454

0 commit comments

Comments
 (0)