Commit 642472c3 authored by Bryce Johnson's avatar Bryce Johnson

Properly read approvalPending from dataset.

parent 03d5a4b3
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
initWidgetState() { initWidgetState() {
this.assignToData('showApprovals', false); this.assignToData('showApprovals', false);
this.assignToData('disableAcceptance', Boolean(this.rootEl.dataset.approvalPending)); this.assignToData('disableAcceptance', this.rootEl.dataset.approvalPending === 'true');
} }
initApprovals() { initApprovals() {
......
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('merge_request_widget/widget_bundle.js') = page_specific_javascript_tag('merge_request_widget/widget_bundle.js')
#merge-request-widget-app.mr-state-widget{ 'data-endpoint'=> merge_request_path(@merge_request), 'data-approval-pending' => !@merge_request.approved? ? 'true' : 'false' } #merge-request-widget-app.mr-state-widget{ 'data-endpoint'=> merge_request_path(@merge_request), 'data-approval-pending' => (!@merge_request.approved?).to_s }
= render 'projects/merge_requests/widget/heading' = render 'projects/merge_requests/widget/heading'
.mr-widget-body .mr-widget-body
-# After conflicts are resolved, the user is redirected back to the MR page. -# After conflicts are resolved, the user is redirected back to the MR page.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment