Closed
Description
For some reason, when I'm giving to subscribe function some options variable, It wraps her arguments in query: {}. This is not cool, to find, that your variable was edited, when you just gave it to your function. I've fixed this by replacing options (in func) on JSON.parse(JSON.stringify(options)). May be there are more efficient way, but idk. Here is example:
let options = {
sort: '-updated',
expand: 'allowed,owner'
};
await pb.collection('users').subscribe('*', () => {}, options);
console.log(options);
// options = {
// "query": {
// "sort": "-updated",
// "expand": "allowed,owner"
// }
// }
Metadata
Metadata
Assignees
Labels
No labels