Skip to content

Commit 7aa7c86

Browse files
explicitly remove readConcern and writeConcern from ListSearchIndex helper function
1 parent d1ba807 commit 7aa7c86

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/collection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,14 +1072,15 @@ export class Collection<TSchema extends Document = Document> {
10721072
): ListSearchIndexesCursor {
10731073
options =
10741074
typeof indexNameOrOptions === 'object' ? indexNameOrOptions : options == null ? {} : options;
1075+
const cleanedOptions = (({ readConcern, writeConcern, ...rest }) => rest)(options);
10751076
const indexName =
10761077
indexNameOrOptions == null
10771078
? null
10781079
: typeof indexNameOrOptions === 'object'
10791080
? null
10801081
: indexNameOrOptions;
10811082

1082-
return new ListSearchIndexesCursor(this as TODO_NODE_3286, indexName, options);
1083+
return new ListSearchIndexesCursor(this as TODO_NODE_3286, indexName, cleanedOptions);
10831084
}
10841085

10851086
/**

0 commit comments

Comments
 (0)