In a blog project, I'm trying to use the getByUID to get an article. const article = await $prismic.api.getByUID('article', params.uid)
It works fine when the requested article is in default locale (en-eu in our case) ;
however, when the article is in any other language, the above query will not work any more. When I pass the {lang: 'locale'} option, the query returns the correct article.
Did this helper method change ? (I'm using the SDK @nuxtjs/prismic)
In my use case, I do not want to pass the { lang } option, because of complex fallback logics. And I'm pretty sure that the UIDs are not repetitive across locales.
I'm not sure I found what is not consistent with t documentation.
As far as I know, when you don't specify the lang then the API will only return the documents in your master locale, and if you would like to get documents in all locales, then you can pass the widecard * such as
api.getByUID('page', 'about-us', { lang : '*' }).then(function(document) {});