Skip to content

Commit f11c429

Browse files
authored
(fix) also sourcemap when defintion is in a ts file (#1482)
this mainly happened with object members because they won't be aliased when imported.
1 parent bcf6b6a commit f11c429

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/typescript-plugin/src/language-service/find-references.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ function _decorateFindReferences(
2424
?.map((reference) => {
2525
const snapshot = snapshotManager.get(reference.definition.fileName);
2626
if (!isSvelteFilePath(reference.definition.fileName) || !snapshot) {
27-
return reference;
27+
return {
28+
...reference,
29+
references: mapReferences(reference.references, snapshotManager, logger)
30+
};
2831
}
2932

3033
const textSpan = snapshot.getOriginalTextSpan(reference.definition.textSpan);

0 commit comments

Comments
 (0)