summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-08-16 22:26:30 +0300
committerFatih Acet <acetfatih@gmail.com>2017-08-16 22:26:30 +0300
commit6aeb99c98bee304c5010a1173c47777eff1e04a5 (patch)
tree4200e10a796a30a4948c315f5944c75977e6f014 /app
parent5604348fccd6d584f5d890e42766dc911ae2b86b (diff)
downloadgitlab-ce-6aeb99c98bee304c5010a1173c47777eff1e04a5.tar.gz
IssueNotesRefactor: Add existence check to find the note.
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes/stores/getters.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/stores/getters.js b/app/assets/javascripts/notes/stores/getters.js
index 669728f0c20..2649debebc5 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 &&
+ state.userData !== undefined && note.author &&
note.author.id === state.userData.id;
export const getCurrentUserLastNote = state => _.flatten(