Merge "Prevent 'merged as sadface'"

This commit is contained in:
David Pursehouse
2017-01-26 00:06:38 +00:00
committed by Gerrit Code Review
2 changed files with 8 additions and 6 deletions

View File

@@ -255,12 +255,14 @@ limitations under the License.
<a href$="[[_computeChangePermalink(_change._number)]]">[[_change._number]]</a><!--
--><template is="dom-if" if="[[_changeStatus]]">
([[_changeStatus]]<!--
--><template is="dom-if" if="[[_computeShowCommitInfo(_changeStatus)]]">
--><template
is="dom-if"
if="[[_computeShowCommitInfo(_changeStatus, _change.current_revision)]]">
as
<gr-commit-info
change="[[_change]]"
commit-info="[[_computeMergedCommitInfo(_change.current_revision, _change.revisions)]]"
server-config="[[serverConfig]]"></gr-commit-info><!--
change="[[_change]]"
commit-info="[[_computeMergedCommitInfo(_change.current_revision, _change.revisions)]]"
server-config="[[serverConfig]]"></gr-commit-info><!--
--></template><!--
-->)<!--
--></template><!--

View File

@@ -563,8 +563,8 @@
return statusString || '';
},
_computeShowCommitInfo: function(changeStatus) {
return changeStatus === 'Merged';
_computeShowCommitInfo: function(changeStatus, current_revision) {
return changeStatus === 'Merged' && current_revision;
},
_computeMergedCommitInfo: function(current_revision, revisions) {