Follow up to I42b2afe013

Change-Id: I47ee07fa5d759e8c7633c63aa0c1a218df891209
This commit is contained in:
Wyatt Allen
2017-11-14 15:38:16 -08:00
parent 38ed378c5c
commit d43a506086

View File

@@ -76,6 +76,10 @@
ChangeComments.prototype._patchNumEquals =
Gerrit.PatchSetBehavior.patchNumEquals;
ChangeComments.prototype._isMergeParent =
Gerrit.PatchSetBehavior.isMergeParent;
ChangeComments.prototype._getParentIndex =
Gerrit.PatchSetBehavior.getParentIndex;
/**
* Get an object mapping file paths to a boolean representing whether that
@@ -300,12 +304,11 @@
*/
ChangeComments.prototype._isInBaseOfPatchRange = function(comment, range) {
// If the base of the patch range is a parent of a merge, and the comment
// appears on a specific parent. Then only show the comment if the parent
// appears on a specific parent then only show the comment if the parent
// index of the comment matches that of the range.
if (comment.parent && comment.side === PARENT) {
return Gerrit.PatchSetBehavior.isMergeParent(range.basePatchNum) &&
comment.parent ===
Gerrit.PatchSetBehavior.getParentIndex(range.basePatchNum);
return this._isMergeParent(range.basePatchNum) &&
comment.parent === this._getParentIndex(range.basePatchNum);
}
// If the base of the range is the parent of the patch: