Skip to content

Commit

Permalink
Fix picker-based code editor navigation (#6993)
Browse files Browse the repository at this point in the history
  • Loading branch information
siggisim authored Jul 8, 2024
1 parent 539a6b1 commit 4fd7c36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enterprise/app/code/code.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,14 @@ export default class CodeComponent extends React.Component<Props, State> {
}
picker_service.show(picker);
picker_service.picked.subscribe((path) => {
if (!path) {
return;
}
this.fetchIfNeededAndNavigate(path);
});
}

fetchIfNeededAndNavigate(path: string, additionalParams?: string) {
fetchIfNeededAndNavigate(path: string, additionalParams = "") {
this.navigateToPath(path + additionalParams);
if (this.state.fullPathToModelMap.has(path)) {
this.setModel(path, this.state.fullPathToModelMap.get(path));
Expand Down

0 comments on commit 4fd7c36

Please sign in to comment.