Skip to content

Commit 0e2db19

Browse files
committed
fix(language-core): tsNode.text is missing in tsc
1 parent 66920c8 commit 0e2db19

File tree

1 file changed

+4
-2
lines changed
  • packages/language-core/lib/codegen/template

1 file changed

+4
-2
lines changed

packages/language-core/lib/codegen/template/element.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { generateInterpolation } from './interpolation';
1515
import { generatePropertyAccess } from './propertyAccess';
1616
import { generateTemplateChild } from './templateChild';
1717
import { generateObjectProperty } from './objectProperty';
18+
import { getNodeText } from '../../parsers/scriptSetupRanges';
1819

1920
const colonReg = /:/g;
2021

@@ -726,10 +727,11 @@ function* generateReferencesForScopedCssClasses(
726727
}
727728

728729
function walkIdentifier(node: ts.Identifier) {
730+
const text = getNodeText(ts, node, ast);
729731
ctx.scopedClasses.push({
730732
source: 'template',
731-
className: node.text,
732-
offset: node.end - node.text.length + startOffset
733+
className: text,
734+
offset: node.end - text.length + startOffset
733735
});
734736
}
735737
}

0 commit comments

Comments
 (0)