beforeUnmount hook called twice
Version
3.0.11
Reproduction link
https://github.com/m0ksem/vue-i18n-render-error
Steps to reproduce
Git clone repo.
Open console. // You will see how the separator component mounted twice with different uid. It's ok because there are two separators in the list of 3 items.
switch to "About page." // You will see how beforeUnmount executed twice for components with the same uid (for the same component).
What is expected?
beforeUnmount executed twice for components with different uid.
What is actually happening?
beforeUnmount executed twice for the same component with the same uid.
I defined the test function in mounted hook, then execute and delete it in beforeUnmount. Because beforeUnmount executed twice I get an error after the second execution of my test function.
Actual problem https://github.com/intlify/vue-i18n-next/issues/476
I know that can be fixed moving const separatorNode = this.$slots.separator ? this.$slots.separator() : '/'
inside forEach.