Fix empty node test

This commit is contained in:
Christopher Schleiden
2022-11-23 07:58:05 -08:00
parent 1901924387
commit 2843bdc2d8
@@ -76,8 +76,9 @@ export function findToken(pos: Position, root?: TemplateToken): TokenResult {
};
}
// If the value is an empty node (null, empty string)
if (emptyNode(value)) {
// If pos, key, and value are on the same line, and value is an empty node (null, empty string) return early
// we cannot reliably check the position in that empty node
if (onSameLine(pos, key, value) && emptyNode(value)) {
return {
parent: mappingToken,
keyToken: key,