Skip to content

Commit

Permalink
Fix bug: use the new getNestedPropertyOf function
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminrancourt committed Oct 12, 2017
1 parent 127eda1 commit de5cedc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sherby-localize-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
*/
extractTranslation: {
type: Function,
computed: '__computeExtractTranslation(getNestedPropertyOfWithDelimiter, delimiterTranslation)'
computed: '__computeExtractTranslation(getNestedPropertyOf, delimiterTranslation)'
}
}
}
Expand Down Expand Up @@ -136,15 +136,15 @@

/**
* Compute the extract translation.
* @param {Function} getNestedPropertyOfWithDelimiter Function to obtain the nested property.
* @param {Function} getNestedPropertyOf Function to obtain the nested property.
* @return {Function} Extract translation function.
*/
__computeExtractTranslation (getNestedPropertyOfWithDelimiter, delimiterTranslation) {
__computeExtractTranslation (getNestedPropertyOf, delimiterTranslation) {
let returnFunction

if (getNestedPropertyOfWithDelimiter && delimiterTranslation) {
if (getNestedPropertyOf && delimiterTranslation) {
returnFunction = (resources, language, key) => {
const translation = getNestedPropertyOfWithDelimiter(resources, key, null, delimiterTranslation)
const translation = getNestedPropertyOf(resources, key, null, delimiterTranslation)
return translation ? translation.message : null
}
} else {
Expand Down

0 comments on commit de5cedc

Please sign in to comment.