When I try to use ‘WixLocation.queryParams.add’ I get the following error:
Uncaught (in promise) TypeError: Cannot read property ‘add’ of undefined
My code:
import wixLocation from 'wix-location';
// ...
filters = { "type": "game", "order": "descending" };
wixLocation.QueryParams.add(filters);
Is this a bug or am I doing something wrong?
You’ve got a typo in your code
import wixLocation from 'wix-location';
// ...
filters = { "type": "game", "order": "descending" };
wixLocation.queryParams.add(filters);
Ooh OK. Thanks a lot. But it’s a bit strange that the code editor doesn’t show that option in the suggestion dropdown thing even though it works.
@pptgames Indeed, the feature is new and they probably forgot to update the API definition. I will notify the doc team