PolyGerrit: If change throws null for change then return ''
This is to make sure we doint call change.topic which will throw an null
per below.
I was getting an undefined error
gr-app.js:2746 Uncaught (in promise) TypeError: Cannot read property 'topic' of null
at gr-app.js:2746
at <anonymous>
when debugging https://gerrit-review.googlesource.com/#/c/108092/
Change-Id: Ie9802cdf8a601570a6f8352054c8cd042e348792
This commit is contained in:
@@ -923,7 +923,10 @@
|
||||
return this.$.restAPI.getChangeDetail(this._changeNum,
|
||||
this._handleGetChangeDetailError.bind(this)).then(
|
||||
change => {
|
||||
// Issue 4190: Coalesce missing topics to null.
|
||||
if (!change) {
|
||||
return '';
|
||||
}
|
||||
// Issue 4190: Coalesce missing topics to null.
|
||||
if (!change.topic) { change.topic = null; }
|
||||
if (!change.reviewer_updates) {
|
||||
change.reviewer_updates = null;
|
||||
|
||||
Reference in New Issue
Block a user