mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-25 11:14:05 +00:00
Object rest spread
This commit is contained in:
parent
cd71bc48b3
commit
0f4f7dffff
1 changed files with 6 additions and 3 deletions
|
|
@ -39,9 +39,12 @@ module.exports = class AwsS3 extends Plugin {
|
|||
locale: defaultLocale
|
||||
}
|
||||
|
||||
this.opts = Object.assign({}, defaultOptions, opts)
|
||||
this.locale = Object.assign({}, defaultLocale, this.opts.locale)
|
||||
this.locale.strings = Object.assign({}, defaultLocale.strings, this.opts.locale.strings)
|
||||
this.opts = { ...defaultOptions, ...opts }
|
||||
this.locale = {
|
||||
...defaultLocale,
|
||||
...this.opts.locale,
|
||||
strings: { ...defaultLocale.strings, ...this.opts.locale.strings }
|
||||
}
|
||||
|
||||
this.translator = new Translator({ locale: this.locale })
|
||||
this.i18n = this.translator.translate.bind(this.translator)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue