From c33da0cf8e91ff9d349a143d396aa986267954fc Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Thu, 12 Oct 2017 10:01:38 +0900 Subject: [PATCH] Fix some pointed by eslint --- browser/main/NoteList/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index dfd9a74e..b3718bec 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -289,7 +289,7 @@ class NoteList extends React.Component { let storageKey = params.storageKey let folderKey = params.folderKey let storage = data.storageMap.get(storageKey) - if (location.pathname.match(/\/home|\/starred|\/trash/)){ + if (location.pathname.match(/\/home|\/starred|\/trash/)) { return unorderedNotes } if (storage === undefined) return [] @@ -441,14 +441,13 @@ class NoteList extends React.Component { let note = this.notes[targetIndex] const label = note.isPinned ? 'Remove pin' : 'Pin to Top' - let menu = new Menu() menu.append(new MenuItem({ label: label, click: (e) => this.handlePinToTop(e, uniqueKey) })) - if (!location.pathname.match(/\/home|\/starred|\/trash/)){ + if (!location.pathname.match(/\/home|\/starred|\/trash/)) { menu.popup() } } @@ -482,7 +481,7 @@ class NoteList extends React.Component { return note != null && note.storage + '-' + note.key === uniqueKey }) let note = this.notes[targetIndex] - note.isPinned = note.isPinned ? false : true + note.isPinned = !note.isPinned dataApi .updateNote(note.storage, note.key, note)