Skip to content

Commit

Permalink
fix(query-bar): save hint in queries
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy committed Jul 22, 2024
1 parent 9ff18df commit 3a7eb87
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('get-query-attributes', function () {
skip: 1,
limit: 20,
update: { $set: { a: 1 } },
hint: { $natural: 1 },
})
).to.deep.equal({
filter: {
Expand All @@ -36,6 +37,7 @@ describe('get-query-attributes', function () {
skip: 1,
limit: 20,
update: { $set: { a: 1 } },
hint: { $natural: 1 },
});
});
});
2 changes: 2 additions & 0 deletions packages/compass-query-bar/src/utils/get-query-attributes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const getQueryAttributes = ({
limit,
skip,
update,
hint,
}: Partial<FavoriteQuery>): Partial<FavoriteQuery> => {
const attributes = {
filter,
Expand All @@ -18,6 +19,7 @@ export const getQueryAttributes = ({
limit,
skip,
update,
hint,
};
Object.keys(attributes).forEach((k) => {
const key = k as keyof typeof attributes;
Expand Down

0 comments on commit 3a7eb87

Please sign in to comment.