-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(createRecentSearchesPlugin): rewrite docs #469
Conversation
Broken unit tests are caused by 752afd8 which broke the build. |
e852fc7
to
f8ae4c8
Compare
Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
91c418f
to
3e29b2e
Compare
async getAll(query) { | ||
const items = await RecentSearchesItem.find({}); | ||
|
||
return search({ query, items, limit: 5 }); | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async
is not super democratized in the frontend, it requires special configuration.
async getAll(query) { | |
const items = await RecentSearchesItem.find({}); | |
return search({ query, items, limit: 5 }); | |
}, | |
getAll(query) { | |
return RecentSearchesItem.find({}).then((items) => { | |
return search({ query, items, limit: 5 }); | |
}); | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many browsers support async
and await
without transforms. Internet Explorer is the only one that doesn't, but it doesn't support the Promise
constructor either so users would need transforms or polyfills for IE 11 anyway.
* docs(createLocalStorageRecentSearchesPlugin): rewrite docs * fix(createLocalStorageRecentSearchesPlugin): apply changes from #469
This rewrites the
createRecentSearchesPlugin
docs.I've added inline comments on some changes for easier reviewing.