Skip to content

Commit

Permalink
fix(language-core): tsNode.text is missing in tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 26, 2024
1 parent 66920c8 commit 0e2db19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/language-core/lib/codegen/template/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { generateInterpolation } from './interpolation';
import { generatePropertyAccess } from './propertyAccess';
import { generateTemplateChild } from './templateChild';
import { generateObjectProperty } from './objectProperty';
import { getNodeText } from '../../parsers/scriptSetupRanges';

const colonReg = /:/g;

Expand Down Expand Up @@ -726,10 +727,11 @@ function* generateReferencesForScopedCssClasses(
}

function walkIdentifier(node: ts.Identifier) {
const text = getNodeText(ts, node, ast);
ctx.scopedClasses.push({
source: 'template',
className: node.text,
offset: node.end - node.text.length + startOffset
className: text,
offset: node.end - text.length + startOffset
});
}
}
Expand Down

0 comments on commit 0e2db19

Please sign in to comment.