Skip to content

Commit b9fb0d4

Browse files
spacedragonzfy0701
authored andcommitted
[Code] fix goto definition failed after user click go back (#32968)
1 parent 5d174f2 commit b9fb0d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

x-pack/plugins/code/public/monaco/editor_service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ export class EditorService extends StandaloneCodeEditorServiceImpl {
5555
if (input.options && input.options.selection) {
5656
const { startColumn, startLineNumber } = input.options.selection;
5757
const url = uri + `!L${startLineNumber}:${startColumn}`;
58-
const lastPath = history.location.pathname;
59-
if (lastPath === url) {
58+
const currentPath = window.location.hash.substring(1);
59+
if (currentPath === url) {
6060
this.helper!.revealPosition(startLineNumber, startColumn);
6161
} else {
6262
history.push(url);

0 commit comments

Comments
 (0)