Skip to content

Commit

Permalink
fix: Auto fix code generate to the wrong place for the imported module (
Browse files Browse the repository at this point in the history
  • Loading branch information
jiashengguo authored Apr 25, 2024
1 parent 5cc8f18 commit f6c6b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/schema/src/language-server/zmodel-code-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export class ZModelCodeActionProvider implements CodeActionProvider {

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

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

0 comments on commit f6c6b65

Please sign in to comment.