Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6f5656c

Browse files
committedOct 31, 2021
Fix exception on missing positions
1 parent dcc2a14 commit 6f5656c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎index.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,12 @@ function all(config, parent) {
158158
const child = parent.children[index]
159159
const start = pointStart(child)
160160

161-
if (end && start.line !== end.line) {
161+
if (
162+
end &&
163+
end.line !== null &&
164+
start.line !== null &&
165+
start.line !== end.line
166+
) {
162167
const lineEnding = config.parser.tokenizeWhiteSpace(
163168
'\n'.repeat(start.line - end.line)
164169
)

0 commit comments

Comments
 (0)
Please sign in to comment.