Skip to content

Commit

Permalink
Merge pull request #265 from vtex-apps/fix/id-undefined-error
Browse files Browse the repository at this point in the history
Fix error when binding is undefined
  • Loading branch information
thalytafabrine authored Nov 8, 2021
2 parents 61925a6 + e8c7c18 commit 6f0d9a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@types/node": "^12.0.0",
"@types/qs": "^6.5.1",
"@types/ramda": "^0.26.21",
"@vtex/api": "6.45.4",
"@vtex/api": "6.45.3",
"@vtex/tsconfig": "^0.2.0",
"eslint": "^5.15.3",
"eslint-config-vtex": "^10.1.0",
Expand Down
4 changes: 2 additions & 2 deletions node/utils/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ export const translateManyToCurrentLanguage = (messages: Message[], ctx: Context

export const shouldTranslateToUserLocale = ({ vtex: { tenant, locale } }: Context) => tenant?.locale !== locale

export const shouldTranslateToBinding = ({ translated }: Context, ignoreIndexedTranslation?: boolean) =>
!translated || ignoreIndexedTranslation
export const shouldTranslateToBinding = ({ translated, vtex: { binding } }: Context, ignoreIndexedTranslation?: boolean) =>
binding && (!translated || ignoreIndexedTranslation)

export const shouldTranslateToTenantLocale = ({ vtex: { locale, tenant } }: Context) =>
Boolean(tenant?.locale && locale && tenant.locale !== locale)
10 changes: 5 additions & 5 deletions node/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -777,10 +777,10 @@
lodash.unescape "4.0.1"
semver "5.5.0"

"@vtex/[email protected].4":
version "6.45.4"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.4.tgz#58be7497c0c0f91a388fabd42149e48cb95e271d"
integrity sha512-DVAJr5BkSjXupjn2h5Z1In8C3Li9kZwCXPwRQbpIgyS7s9dN2ZEFQc6nQlJm6ZoDCoyYBg62LgD7Kurvz9jc3w==
"@vtex/[email protected].3":
version "6.45.3"
resolved "https://registry.yarnpkg.com/@vtex/api/-/api-6.45.3.tgz#fe7d08adb4eab1fda5e34143cc6302a4c5aa5f52"
integrity sha512-kiD7We1TCKDyBdpYoh2Se3An+jTJRUzXGNpKifoDZylWQ1PyIx+3oL5ZAif9InlY3uJkfEisSAI6nxoKTgvPfw==
dependencies:
"@types/koa" "^2.11.0"
"@types/koa-compose" "^3.2.3"
Expand Down Expand Up @@ -4643,7 +4643,7 @@ static-extend@^0.1.1:
define-property "^0.2.5"
object-copy "^0.1.0"

stats-lite@vtex/node-stats-lite#dist:
"stats-lite@github:vtex/node-stats-lite#dist":
version "2.2.0"
resolved "https://codeload.github.com/vtex/node-stats-lite/tar.gz/1b0d39cc41ef7aaecfd541191f877887a2044797"
dependencies:
Expand Down

0 comments on commit 6f0d9a5

Please sign in to comment.