Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Update mixin.js #995

Merged
merged 5 commits into from
Sep 11, 2020
Merged

Update mixin.js #995

merged 5 commits into from
Sep 11, 2020

Conversation

ferencbeutel4711
Copy link
Contributor

@ferencbeutel4711 ferencbeutel4711 commented Sep 9, 2020

This PR fixes a bug that happens when a SFC has a <i18n> block aswell as a i18n configuration in the Vue Component options.
Previously, the i18n configuration from the Vue Component options would be overridden by the <i18n> block; Using this new behaviour, the <i18n> block and the i18n configuration from the Vue Component options are merged.
This also helps to provide mixin support, since now a consumer of this library can have a SFC as a parent component, which uses a Vue mixin, and using a custom vue optionMergeStrategy, full mixin support can be achieved from consumer side.

This issue fixes a bug that happens when a SFC has a <i18n> block aswell as a i18n configuration in the Vue Component options.
Previously, the i18n configuration from the Vue Component options would be overridden by the <i18n> block; Using this new behaviour, the <i18n> block and the i18n configuration from the Vue Component options are merged.
This also helps to provide mixin support, since now a consumer of this library can have a SFC as a parent component, which uses a Vue mixin, and using a custom vue optionMergeStrategy, full mixin support can be achieved from consumer side.
@kazupon
Copy link
Owner

kazupon commented Sep 10, 2020

Thank you for your PR!
Could you add the unit tests please? 🙏

@ferencbeutel4711
Copy link
Contributor Author

Hi kazupon, thank you for recognizing the PR :)
I have added a unit test. As I am not really familiar with the codebase, I hope that I've done it correctly.

@kazupon
Copy link
Owner

kazupon commented Sep 11, 2020

@ferencbeutel4711
Thanks! 👍
LGTM!

@kazupon kazupon merged commit 2b7eab7 into kazupon:v8.x Sep 11, 2020
@kazupon kazupon added the Type: Bug Bug or Bug fixes label Sep 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR: merged Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants