@explorer-1/vue 0.2.41 → 0.2.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@explorer-1/vue",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -140,6 +140,14 @@ export default defineComponent({
140
140
  return 'noopener'
141
141
  }
142
142
  return undefined
143
+ },
144
+ computedTo() {
145
+ let toValue = this.to
146
+ // filter out unnecessary `/home/` prefix from wagtail default site urlPaths
147
+ if (toValue && typeof toValue === 'string' && toValue.startsWith('/home/')) {
148
+ toValue = toValue.replace('/home/', '/')
149
+ }
150
+ return toValue
143
151
  }
144
152
  },
145
153
  methods: {
@@ -155,10 +163,10 @@ export default defineComponent({
155
163
  <div>
156
164
  <!-- annoyingly repetive due to complexities around `to` and @click.native -->
157
165
  <nuxt-link
158
- v-if="to"
166
+ v-if="computedTo"
159
167
  class="group"
160
168
  :class="computedClass"
161
- :to="to"
169
+ :to="computedTo"
162
170
  :target="theTarget"
163
171
  :rel="theRel"
164
172
  :aria-label="ariaLabel"