From 6aaf9d9eb2665330a74ac28f553e59cddc555d21 Mon Sep 17 00:00:00 2001 From: asmsuechan Date: Sat, 12 Aug 2017 11:54:53 +0900 Subject: [PATCH] Change disable drop on trash --- browser/main/NoteList/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/main/NoteList/index.js b/browser/main/NoteList/index.js index df4e3e9d..9a5d35b8 100644 --- a/browser/main/NoteList/index.js +++ b/browser/main/NoteList/index.js @@ -355,8 +355,9 @@ class NoteList extends React.Component { handleDrop (e) { e.preventDefault() + const { location } = this.props const filepaths = Array.from(e.dataTransfer.files).map(file => { return file.path }) - this.addNotes(filepaths) + if (!location.pathname.match(/\/trashed/)) this.addNotes(filepaths) } // Add notes in the current folder