From d43a506086f4865ae2ee620e9be4c3fca8afa1a4 Mon Sep 17 00:00:00 2001 From: Wyatt Allen Date: Tue, 14 Nov 2017 15:38:16 -0800 Subject: [PATCH] Follow up to I42b2afe013 Change-Id: I47ee07fa5d759e8c7633c63aa0c1a218df891209 --- .../elements/diff/gr-comment-api/gr-comment-api.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js index 9322782cb9..209e8c9cab 100644 --- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js +++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js @@ -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: