Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance of mergeLocaleMessage #1099

Closed
cslee opened this issue Jan 12, 2021 · 1 comment
Closed

Performance of mergeLocaleMessage #1099

cslee opened this issue Jan 12, 2021 · 1 comment

Comments

@cslee
Copy link
Contributor

cslee commented Jan 12, 2021

this._vm.$set(this._vm.messages, locale, merge({}, this._vm.messages[locale] || {}, message))

@kazupon Could the line in mergeLocaleMessage above be changed to something like this for better performance? I use this method a lot in my components so this is quite important to me. Thank you so much.

    this._vm.$set(this._vm.messages, locale, merge(
      typeof this._vm.messages[locale] !== 'undefined' && Object.keys(this._vm.messages[locale]).length
        ? this._vm.messages[locale]
        : {},
      message
    ))
kazupon pushed a commit that referenced this issue Jan 16, 2021
Co-authored-by: ericlee <ericlee@openrice.com>
@kazupon
Copy link
Owner

kazupon commented Jan 16, 2021

I've just released v8.22.4
You can check it :)

@kazupon kazupon closed this as completed Jan 16, 2021
This was referenced Mar 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants