Skip to content

Commit

Permalink
Fix compiler “Property 'locale' is missing in type '{}'”
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Nov 9, 2022
1 parent 3265af4 commit 405710d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/govuk/i18n.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
* @param {string} config.locale - An overriding locale for the PluralRules functionality.
*/
export function I18n (translations, config) {
config = config || {}

// Make list of translations available throughout function
this.translations = translations || {}

// The locale to use for PluralRules and NumberFormat
this.locale = config.locale || document.documentElement.lang || 'en'
this.locale = (config && config.locale) || document.documentElement.lang || 'en'
}

/**
Expand Down

0 comments on commit 405710d

Please sign in to comment.