vue-github-button icon indicating copy to clipboard operation
vue-github-button copied to clipboard

fix: $refs._ underfined in beforeUpdate()

Open 0xJacky opened this issue 2 years ago • 0 comments

Fix issue #21.

In my case, this.$refs._ is undefined in beforeUpdate() when I refresh the page. After I added if condition to test whether this.$refs._ is defined, I found that it will render two buttons if I refresh the page. However, if I use router.push to visit the page, is ok.

I modified the paint() function. I clear all the children at first, so this will not render duplicately.

0xJacky avatar Apr 15 '23 09:04 0xJacky