Skip to content

Commit e385165

Browse files
committed
fix: Auto fix code generate to the wrong place for the imported module
1 parent da0bbd1 commit e385165

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)