Inline removal of Gerrit.Nav in Gerrit 3.7 Iabb10c69ffc159baae1062e10ee55dc8fa4ae0a7 removes `getUrlForSearchQuery` in favor of `search.ts`. `Gerrit.Nav` is removed by If38fa09e822fe62a54b1c22f6deb70691dbc9d92 This causes the plugin to throws `TypeError: Gerrit.Nav is undefined` when formatting links to the dependent/needed-by changes. Replace the removed method by crafting the link directly. Ref: https://phabricator.wikimedia.org/T355521 Change-Id: I8044242b5e75dd0c3defef591f57b4211e2aff37
diff --git a/gr-zuul/gr-zuul.js b/gr-zuul/gr-zuul.js index 89e5527..b6893ce 100644 --- a/gr-zuul/gr-zuul.js +++ b/gr-zuul/gr-zuul.js
@@ -107,7 +107,7 @@ } _computeDependencyUrl(changeInfo) { - return Gerrit.Nav.getUrlForSearchQuery(changeInfo.change_id); + return `${window.CANONICAL_PATH || ''}/q/${changeInfo.change_id}`; } _isDependsOnSectionVisible() {