@vtex/api 7.2.6-beta.0 → 7.2.6

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.
@@ -31,13 +31,13 @@ const handleSingleString = (ctx, loader, behavior, directiveName) => async (rawM
31
31
  if (content == null) {
32
32
  throw new Error(`@${directiveName} directive needs a content to translate, but received ${JSON.stringify(rawMessage)}`);
33
33
  }
34
+ if (state === 'translated') {
35
+ return content;
36
+ }
34
37
  const from = maybeFrom || (binding === null || binding === void 0 ? void 0 : binding.locale) || (tenant === null || tenant === void 0 ? void 0 : tenant.locale);
35
38
  if (from == null) {
36
39
  throw new Error(`@${directiveName} directive needs a source language to translate from. You can do this by either setting ${'`ctx.vtex.tenant`'} variable, call this app with the header ${'`x-vtex-tenant`'} or format the string with the ${'`formatTranslatableStringV2`'} function with the ${'`from`'} option set`);
37
40
  }
38
- if (state === 'translated') {
39
- return content;
40
- }
41
41
  return loader.load({
42
42
  behavior,
43
43
  content,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/api",
3
- "version": "7.2.6-beta.0",
3
+ "version": "7.2.6",
4
4
  "description": "VTEX I/O API client",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",