@vuedx/template-ast-types
Advanced tools
Comparing version 0.7.3-next-1646032139.0 to 0.7.3-next-1646814663.0
@@ -317,3 +317,2 @@ 'use strict'; | ||
function findTemplateChildNodeAt(ast, position, mode) { | ||
var _a, _b; | ||
const result = findTemplateNodeInRange(ast, position, position, mode); | ||
@@ -328,3 +327,3 @@ while (result.ancestors.length > 0) { | ||
} | ||
result.node = (_b = (_a = result.ancestors.pop()) === null || _a === void 0 ? void 0 : _a.node) !== null && _b !== void 0 ? _b : null; | ||
result.node = result.ancestors.pop()?.node ?? null; | ||
} | ||
@@ -383,3 +382,2 @@ return result; | ||
function findTemplateChildrenInRange(ast, start, end) { | ||
var _a, _b; | ||
if (start === end) { | ||
@@ -395,4 +393,4 @@ const a = findTemplateChildNodeAt(ast, start); | ||
return [a.node]; | ||
const pa = (_a = a.ancestors.pop()) === null || _a === void 0 ? void 0 : _a.node; | ||
const pb = (_b = b.ancestors.pop()) === null || _b === void 0 ? void 0 : _b.node; | ||
const pa = a.ancestors.pop()?.node; | ||
const pb = b.ancestors.pop()?.node; | ||
if (pa == null || pb == null) | ||
@@ -399,0 +397,0 @@ return []; |
{ | ||
"name": "@vuedx/template-ast-types", | ||
"version": "0.7.3-next-1646032139.0", | ||
"version": "0.7.3-next-1646814663.0", | ||
"description": "Helper functions for Vue template AST", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
91509
1419