Skip to content

Commit 501f7be

Browse files
Ignored null values in element position
1 parent c9b1e27 commit 501f7be

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,10 @@ function element(ast, children, config) {
155155

156156
if (name === 'template' && 'content' in ast) {
157157
pos = ast.sourceCodeLocation
158-
start = pos && pos.startTag && position(pos.startTag).end
159-
end = pos && pos.endTag && position(pos.endTag).start
158+
start = pos && pos.startTag && position(pos.startTag)
159+
start = start && start.end
160+
end = pos && pos.endTag && position(pos.endTag)
161+
end = end && end.start
160162

161163
node.content = transform(ast.content, config)
162164

0 commit comments

Comments
 (0)