@saasquatch/component-environment 1.0.1-0 → 1.0.1-1
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/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -361,7 +361,7 @@ var import_dom_context2 = require("dom-context");
|
|
|
361
361
|
var import_dom_context = require("dom-context");
|
|
362
362
|
var debug3 = (...args) => debug(LOCALE_CONTEXT_NAME, ...args);
|
|
363
363
|
function validateLocale(locale) {
|
|
364
|
-
if (locale &&
|
|
364
|
+
if (locale && /^[a-z]{2}_(?:[A-Z]{2}|[0-9]{3})$/.test(locale)) {
|
|
365
365
|
return locale;
|
|
366
366
|
}
|
|
367
367
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -312,7 +312,7 @@ import { ContextListener } from "dom-context";
|
|
|
312
312
|
import { ContextProvider } from "dom-context";
|
|
313
313
|
var debug3 = (...args) => debug(LOCALE_CONTEXT_NAME, ...args);
|
|
314
314
|
function validateLocale(locale) {
|
|
315
|
-
if (locale &&
|
|
315
|
+
if (locale && /^[a-z]{2}_(?:[A-Z]{2}|[0-9]{3})$/.test(locale)) {
|
|
316
316
|
return locale;
|
|
317
317
|
}
|
|
318
318
|
}
|