Fix navigate back to change page with '[' on first diff.

It got broken by js-ts migration.

Bug: Issue 13543

Change-Id: I1d331448dbe9c1da7d58d27d19ea2e00a06925b1
This commit is contained in:
Milutin Kristofic
2020-10-21 14:30:13 +02:00
parent c6cb074a09
commit ee3012b743

View File

@@ -726,7 +726,7 @@ export class GrDiffView extends KeyboardShortcutMixin(
_navToFile(path: string, fileList: string[], direction: -1 | 1) {
const newPath = this._getNavLinkPath(path, fileList, direction);
if (!newPath?.path) return;
if (!newPath) return;
if (!this._change) return;
if (!this._patchRange) return;
@@ -739,6 +739,7 @@ export class GrDiffView extends KeyboardShortcutMixin(
return;
}
if (!newPath.path) return;
GerritNav.navigateToDiff(
this._change,
newPath.path,