Skip to content

Commit f6c6b65

Browse files
authored
fix: Auto fix code generate to the wrong place for the imported module (#1377)
1 parent 5cc8f18 commit f6c6b65

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/schema/src/language-server/zmodel-code-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class ZModelCodeActionProvider implements CodeActionProvider {
134134

135135
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
136136
const endOffset = oppositeModel.$cstNode!.end - 1;
137-
const position = document.textDocument.positionAt(endOffset);
137+
const position = targetDocument.textDocument.positionAt(endOffset);
138138

139139
return {
140140
title: `Add opposite relation fields on ${oppositeModel.name}`,

0 commit comments

Comments
 (0)