@brightspace-ui/intl 3.34.2 → 3.34.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/localize.js +5 -4
- package/package.json +1 -1
package/lib/localize.js
CHANGED
|
@@ -238,15 +238,16 @@ export const getLocalizeClass = (superclass = class {}) => class LocalizeClass e
|
|
|
238
238
|
if (osloCollection) {
|
|
239
239
|
const oslo = this.documentLocaleSettings.oslo;
|
|
240
240
|
let languageId = 0;
|
|
241
|
-
if (oslo) {
|
|
242
|
-
const batch = new URL(oslo.batch, document.location.origin);
|
|
243
|
-
const collection = new URL(oslo.collection, document.location.origin);
|
|
241
|
+
if (oslo.collection) {
|
|
244
242
|
languageId = supportedLocalesDetails.find(l => l.code === osloLang || l.pack === osloLang)?.id;
|
|
245
243
|
if (languageId) {
|
|
246
|
-
|
|
244
|
+
const batch = oslo.batch && new URL(oslo.batch, document.location.origin);
|
|
245
|
+
if (batch && languageId !== batch.searchParams.get('languageId')) {
|
|
247
246
|
batch.searchParams.set('languageId', languageId);
|
|
248
247
|
oslo.batch = batch.toString();
|
|
249
248
|
}
|
|
249
|
+
|
|
250
|
+
const collection = new URL(oslo.collection, document.location.origin);
|
|
250
251
|
if (languageId !== collection.searchParams.get('languageId')) {
|
|
251
252
|
collection.searchParams.set('languageId', languageId);
|
|
252
253
|
oslo.collection = collection.toString();
|
package/package.json
CHANGED