getNavigationInfo error?

My site doesn’t work :frowning:

There was an error in your script
TypeError: Cannot read property ‘getNavigationInfo’ of undefined

any ideas?

Hi, can you please share the code that doesn’t work?

Copy and pasted a script from the help, and it made my site not functional.

People like me that don’t know JS well make stupid mistake…

problematic script:

import wixLocation from ‘wix-location’;
// here is the problematic line…
let query = wixLocation.query;

$w.onReady(function () {

if (query.expertUUID) {
expertUUID = query.expertUUID;
}
});

Looks like an issue on our side, I’ll forward it to the relevant team and update.

Hi, using ‘wix-location’ is possible only after the page is ready, meaning inside the $w.onReady callback.
We are changing the documentation to reflect that.
Thanks!