Skip to content

Commit c3de2a4

Browse files
committed
fix: comments check (fix #931)
1 parent 674ea6a commit c3de2a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ module.exports = function (content) {
8989
var output = ''
9090
var parts = parse(content, fileName, this.sourceMap)
9191
var hasScoped = parts.styles.some(function (s) { return s.scoped })
92-
var hasComment = parts.template && parts.template.attrs.comments
92+
var hasComment = parts.template && parts.template.attrs && parts.template.attrs.comments
9393

9494
var templateCompilerOptions = '?' + JSON.stringify({
9595
id: moduleId,

0 commit comments

Comments
 (0)