summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2018-01-11 22:21:02 +0100
committerFatih Acet <acetfatih@gmail.com>2018-01-11 22:51:19 +0100
commit2d36c726d801ff9cfa50d507b62fa1a3ab38c687 (patch)
treee59998387f01db00226446f4f800fa1974fd9237
parent4dcd50d7de2cfdfd160d69c5bbb26687ae003807 (diff)
downloadgitlab-ce-2d36c726d801ff9cfa50d507b62fa1a3ab38c687.tar.gz
MRNotesRefactor: Fix ESLint, Karma and Haml linters.
-rw-r--r--app/assets/javascripts/notes/components/notes_app.vue13
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue4
-rw-r--r--app/views/shared/notes/_notes_with_form.html.haml2
-rw-r--r--spec/javascripts/notes/components/note_app_spec.js1
4 files changed, 12 insertions, 8 deletions
diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue
index 56df8061651..d8165b9881f 100644
--- a/app/assets/javascripts/notes/components/notes_app.vue
+++ b/app/assets/javascripts/notes/components/notes_app.vue
@@ -146,18 +146,21 @@
document.addEventListener('newNoteAdded', () => {
this.poll();
- })
+ });
},
watch: {
notes: {
deep: true,
handler() {
if (isInMRPage()) {
- const legacyNotesApp = Notes.getInstance();
- legacyNotesApp && legacyNotesApp.refresh();
+ const legacyNotesApp = window.Notes.getInstance();
+
+ if (legacyNotesApp) {
+ legacyNotesApp.refresh();
+ }
}
- }
- }
+ },
+ },
},
};
</script>
diff --git a/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue b/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue
index eeb29711699..80e3db52cb0 100644
--- a/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue
@@ -19,6 +19,6 @@
export default {
components: {
skeletonLoadingContainer,
- }
+ },
};
-</script> \ No newline at end of file
+</script>
diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml
index e27b875b817..037e960ce8d 100644
--- a/app/views/shared/notes/_notes_with_form.html.haml
+++ b/app/views/shared/notes/_notes_with_form.html.haml
@@ -2,7 +2,7 @@
- discussion_locked = issuable&.discussion_locked?
- has_vue_discussions_cookie = cookies[:vue_mr_discussions] == 'true'
-- if !has_vue_discussions_cookie
+- unless has_vue_discussions_cookie
%ul#notes-list.notes.main-notes-list.timeline
= render "shared/notes/notes"
diff --git a/spec/javascripts/notes/components/note_app_spec.js b/spec/javascripts/notes/components/note_app_spec.js
index 7c8d6685ee1..aa306cab6c7 100644
--- a/spec/javascripts/notes/components/note_app_spec.js
+++ b/spec/javascripts/notes/components/note_app_spec.js
@@ -9,6 +9,7 @@ describe('note_app', () => {
let vm;
beforeEach(() => {
+ $('body').attr('data-page', 'projects:merge_requests:show');
const IssueNotesApp = Vue.extend(notesApp);
mountComponent = (data) => {