Skip to content

Commit d095792

Browse files
committed
fix: ensure html attributes
1 parent 4f2e3e9 commit d095792

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/parseComponent.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ module.exports = (content, opts) => {
186186
tree => {
187187
for (const node of tree) {
188188
if (node.tag) {
189+
node.attrs = node.attrs || {}
189190
const existing =
190191
node.attrs[':style'] || node.attrs['v-bind:style']
191192
node.attrs[':style'] = `$options.style(this, ${existing})`

0 commit comments

Comments
 (0)