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 68a52ef commit 228f7e0Copy full SHA for 228f7e0
packages/content/templates/nuxt-content.js
@@ -10,18 +10,11 @@ function propsToData (props, doc) {
10
const { attribute } = info.find(info.html, key)
11
12
if (key === 'v-bind') {
13
- let val = doc[value]
14
- if (!val) {
15
- val = eval(`(${value})`)
16
- }
+ const val = value in doc ? doc[value] : eval(`(${value})`)
17
obj = Object.assign(obj, val)
18
} else if (key.indexOf(':') === 0 || key.indexOf('v-bind:') === 0) {
19
key = key.replace('v-bind:', '').replace(':', '')
20
- if (doc[value]) {
21
- obj[key] = doc[value]
22
- } else {
23
- obj[key] = eval(`(${value})`)
24
+ obj[key] = value in doc ? doc[value] : eval(`(${value})`)
25
} else if (Array.isArray(value)) {
26
obj[attribute] = value.join(' ')
27
} else {
0 commit comments