@capillarytech/creatives-library 3.1.39 → 3.1.41

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.
@@ -164,8 +164,9 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
164
164
 
165
165
  getMappedLocale(locale) {
166
166
  const map = {
167
- 'en': 'en',
167
+ 'en': 'en-US',
168
168
  'zh-cn': 'zh',
169
+ 'en-US': 'en-US',
169
170
  'zh': 'zh',
170
171
  };
171
172
  return map[locale];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "3.1.39",
4
+ "version": "3.1.41",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -88,7 +88,7 @@ export function updateCharCount(content, isUnicodeEnabled) {
88
88
  break;
89
89
  }
90
90
  }
91
- chars_used = showOptoutCount ? (chars_used + (((optoutUrl && optoutUrl.length) || 0) * noOfOptout) - (optoutTagLength * noOfOptout)) : chars_used;
91
+ chars_used = showOptoutCount && optoutUrl && optoutUrl.length ? (chars_used + (((optoutUrl && optoutUrl.length) || 0) * noOfOptout) - (optoutTagLength * noOfOptout)) : chars_used;
92
92
  if (coding == '7bit') {
93
93
  if (chars_used > 160) {
94
94
  var parts = Math.ceil(chars_used / 153);
@@ -132,8 +132,10 @@ export class Cap extends React.Component { // eslint-disable-line react/prefer-s
132
132
 
133
133
  getMappedLocale(locale) {
134
134
  const map = {
135
- 'en': 'en',
135
+ 'en': 'en-US',
136
136
  'zh-cn': 'zh',
137
+ 'en-US': 'en-US',
138
+ 'zh': 'zh',
137
139
  };
138
140
  return map[locale];
139
141
  }