Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Do not use computed property in data() #96

Merged
merged 1 commit into from
Mar 25, 2019
Merged

Do not use computed property in data() #96

merged 1 commit into from
Mar 25, 2019

Conversation

stayallive
Copy link
Contributor

@stayallive stayallive commented Mar 25, 2019

This plugin uses a computed property to infer the localeName, which would be fine, except it being used in the data() to set the initial value.

This causes the first render of the text to be in english (or default language) and not the configured language, after the first update this is corrected.

Not sure this is the best way ™️ to fix this, but it seemed reasonable enough.


Edit: I noticed the localeName computed property now only is used in a watcher, which can be removed and used to watch the locale prop directly.

src/index.js Outdated Show resolved Hide resolved
@egoist egoist merged commit 4b31cdd into egoist:master Mar 25, 2019
@egoist
Copy link
Owner

egoist commented Mar 25, 2019

🎉 This PR is included in version 5.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@stayallive stayallive deleted the patch-1 branch March 25, 2019 16:48
@stayallive
Copy link
Contributor Author

Thanks for the quick turnaround @egoist, much appreciated!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants