From 99be7d6e2512724be5bfd8756e148c571d4fff07 Mon Sep 17 00:00:00 2001 From: Fatih Acet Date: Fri, 18 Aug 2017 19:02:21 +0300 Subject: [PATCH] =?UTF-8?q?IssueNotesRefactor:=20Don=E2=80=99t=20explicitl?= =?UTF-8?q?y=20check=20against=20undefined.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/notes/stores/getters.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/notes/stores/getters.js b/app/assets/javascripts/notes/stores/getters.js index 2649debebc5..1f0c6af6156 100644 --- a/app/assets/javascripts/notes/stores/getters.js +++ b/app/assets/javascripts/notes/stores/getters.js @@ -19,7 +19,7 @@ export const notesById = state => state.notes.reduce((acc, note) => { const reverseNotes = array => array.slice(0).reverse(); const isLastNote = (note, state) => !note.system && - state.userData !== undefined && note.author && + state.userData && note.author && note.author.id === state.userData.id; export const getCurrentUserLastNote = state => _.flatten( -- GitLab