commit | c4c52fd1f6ff6513be91c814db76f9ff2d7949d1 | [log] [tgz] |
---|---|---|
author | Antoine Musso <hashar@free.fr> | Mon Jan 22 15:19:27 2024 +0100 |
committer | Antoine Musso <hashar@free.fr> | Mon Jan 22 15:19:27 2024 +0100 |
tree | 7e59898afa160900c5871d375f5a6eceaf48aaf2 | |
parent | 16a217cda6a817c6c23e16f5728851915c790880 [diff] |
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() {