change check order to fix ml worker

This commit is contained in:
Abhinav 2022-08-02 12:33:16 +05:30
parent 47f317daf4
commit bada042344

View file

@ -65,7 +65,7 @@ const globalConstants: VernacularConstants<typeof englishConstants> = {
*/
export function getConstantValue<T>(localConstants?: VernacularConstants<T>) {
const searchParam =
runningInBrowser() && !runningInWorker() ? window.location.search : '';
!runningInWorker() && runningInBrowser() ? window.location.search : '';
const query = new URLSearchParams(searchParam);
const currLocale = getLocale(query.get('lang'));