denwa-web-shared 1.0.14 → 1.0.16
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/server/index.cjs.js
CHANGED
|
@@ -77,8 +77,9 @@ const updateTextByTemplate = ({
|
|
|
77
77
|
SUBDOMAIN_NAME,
|
|
78
78
|
SUBDOMAIN_MASK
|
|
79
79
|
}) => {
|
|
80
|
+
const key = SUBDOMAIN_NAME[subdomain];
|
|
81
|
+
if (!subdomain || !key) return text;
|
|
80
82
|
const subdomainData = getByKey(SUBDOMAIN_NAME, subdomain);
|
|
81
|
-
if (!subdomain) return text;
|
|
82
83
|
let result = text;
|
|
83
84
|
const { name, declination, region, regionDeclination } = subdomainData;
|
|
84
85
|
const cityReg = new RegExp(SUBDOMAIN_MASK.CITY, "g");
|
|
@@ -154,7 +155,6 @@ const prepareLocalMetaData = ({
|
|
|
154
155
|
alternates.canonical = `https://${correctHost}${canonical}`;
|
|
155
156
|
}
|
|
156
157
|
if (lang) {
|
|
157
|
-
console.log(lang);
|
|
158
158
|
const langs = lang.locales.filter((item) => item !== lang.locale);
|
|
159
159
|
const languages = {};
|
|
160
160
|
langs.forEach((item) => {
|
package/dist/server/index.es.js
CHANGED
|
@@ -75,8 +75,9 @@ const updateTextByTemplate = ({
|
|
|
75
75
|
SUBDOMAIN_NAME,
|
|
76
76
|
SUBDOMAIN_MASK
|
|
77
77
|
}) => {
|
|
78
|
+
const key = SUBDOMAIN_NAME[subdomain];
|
|
79
|
+
if (!subdomain || !key) return text;
|
|
78
80
|
const subdomainData = getByKey(SUBDOMAIN_NAME, subdomain);
|
|
79
|
-
if (!subdomain) return text;
|
|
80
81
|
let result = text;
|
|
81
82
|
const { name, declination, region, regionDeclination } = subdomainData;
|
|
82
83
|
const cityReg = new RegExp(SUBDOMAIN_MASK.CITY, "g");
|
|
@@ -152,7 +153,6 @@ const prepareLocalMetaData = ({
|
|
|
152
153
|
alternates.canonical = `https://${correctHost}${canonical}`;
|
|
153
154
|
}
|
|
154
155
|
if (lang) {
|
|
155
|
-
console.log(lang);
|
|
156
156
|
const langs = lang.locales.filter((item) => item !== lang.locale);
|
|
157
157
|
const languages = {};
|
|
158
158
|
langs.forEach((item) => {
|