We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cf8018 commit 1f18055Copy full SHA for 1f18055
src/components/link.js
@@ -69,9 +69,12 @@ export default {
69
// find the first <a> child and apply listener and href
70
const a = findAnchor(this.$slots.default)
71
if (a) {
72
- const aData = a.data || (a.data = {})
+ // in case the <a> is a static node
73
+ a.isStatic = false
74
+ const extend = this.constructor.super.util.extend
75
+ const aData = a.data = extend({}, a.data)
76
aData.on = on
- const aAttrs = aData.attrs || (aData.attrs = {})
77
+ const aAttrs = a.data.attrs = extend({}, a.data.attrs)
78
aAttrs.href = href
79
} else {
80
// doesn't have <a> child, apply listener to self
0 commit comments