diff --git a/app/assets/javascripts/notes/components/issue_comment_form.vue b/app/assets/javascripts/notes/components/issue_comment_form.vue index daec33e72a47bad12c5f0d838b5a1c841049280d..407954f3272e2a4cdc6f3956b4e92f00ae0d04d5 100644 --- a/app/assets/javascripts/notes/components/issue_comment_form.vue +++ b/app/assets/javascripts/notes/components/issue_comment_form.vue @@ -34,6 +34,7 @@ ...mapGetters([ 'getCurrentUserLastNote', 'getUserData', + 'getIssueData', ]), isLoggedIn() { return this.getUserData === null ? false : true; @@ -78,7 +79,7 @@ full_data: true, note: { noteable_type: 'Issue', - noteable_id: window.gl.issueData.id, + noteable_id: this.getIssueData.id, note: this.note, }, }, @@ -116,7 +117,6 @@ this.issueState = constants.REOPENED; } - gl.issueData.state = this.issueState; this.isIssueOpen = !this.isIssueOpen; // This is out of scope for the Notes Vue component. diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 12ac93addd7e85659682db3d23b1e9eadbf8bd3d..8e17895c1c72ed979c9ad5377caa8f6da474f809 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -18,7 +18,3 @@ = webpack_bundle_tag 'notes' = render "layouts/init_auto_complete" - -:javascript - window.gl.issueData = #{serialize_issuable(@issue)}; - window.gl.currentUserData = #{UserSerializer.new.represent(current_user).to_json};