wingbot 3.38.0 → 3.38.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/package.json +1 -1
- package/src/resolvers/hbs.js +14 -1
package/package.json
CHANGED
package/src/resolvers/hbs.js
CHANGED
|
@@ -13,6 +13,15 @@ try {
|
|
|
13
13
|
return content;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
if (content.name === 'lang'
|
|
17
|
+
&& typeof content.loc === 'object'
|
|
18
|
+
&& typeof content.data === 'object'
|
|
19
|
+
&& content.data
|
|
20
|
+
&& typeof content.data.root === 'object') {
|
|
21
|
+
|
|
22
|
+
return this.lang || '';
|
|
23
|
+
}
|
|
24
|
+
|
|
16
25
|
const { lang } = this;
|
|
17
26
|
|
|
18
27
|
if (content[lang]) {
|
|
@@ -28,7 +37,11 @@ try {
|
|
|
28
37
|
}
|
|
29
38
|
}
|
|
30
39
|
|
|
31
|
-
|
|
40
|
+
const res = content[Object.keys(content)[0]];
|
|
41
|
+
|
|
42
|
+
return res && typeof res === 'object'
|
|
43
|
+
? (res.text || res.t || '')
|
|
44
|
+
: (res || '');
|
|
32
45
|
});
|
|
33
46
|
} catch (er) {
|
|
34
47
|
handlebars = { compile: (text) => () => text };
|