From 3abe003f5938fe4194bffa1127d3451eca00e321 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Thu, 3 Oct 2019 00:10:56 +0900 Subject: [PATCH] Fix drag and drop link to composebox (#12055) --- app/javascript/mastodon/features/ui/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index f5e48ed31..791ff9a2e 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -327,7 +327,7 @@ class UI extends React.PureComponent { } dataTransferIsText = (dataTransfer) => { - return (dataTransfer && Array.from(dataTransfer.types).includes('text/plain') && dataTransfer.items.length === 1); + return (dataTransfer && Array.from(dataTransfer.types).filter((type) => type === 'text/plain').length === 1); } closeUploadModal = () => {