We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95ebb1e commit 415f681Copy full SHA for 415f681
src/operations/distinct.ts
@@ -56,11 +56,17 @@ export class DistinctOperation extends ModernizedCommandOperation<any[] | Docume
56
}
57
58
override buildCommandDocument(_connection: Connection): Document {
59
- return {
+ const command: Document = {
60
distinct: this.collection.collectionName,
61
key: this.key,
62
query: this.query
63
};
64
+ // we check for undefined specifically here to allow falsy values
65
+ // eslint-disable-next-line no-restricted-syntax
66
+ if (this.options.comment !== undefined) {
67
+ command.comment = this.options.comment;
68
+ }
69
+ return command;
70
71
72
override handleOk(
0 commit comments