about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorJeong Arm <kjwonmail@gmail.com>2019-10-03 00:10:56 +0900
committerThibaut Girka <thib@sitedethib.com>2019-10-03 13:35:17 +0200
commitcd2fce0318b03b853831a23f46dc0ffe1b43ab80 (patch)
tree5df673dc4800644a052b8637d84060a23900ebe8 /app/javascript/flavours/glitch
parent685b6e197f2e4f42195f4a15a1538b379956aa90 (diff)
[Glitch] Fix drag and drop link to composebox
Port 3abe003f5938fe4194bffa1127d3451eca00e321 to glitch-soc

Signed-off-by: Thibaut Girka <thib@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/features/ui/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/index.js b/app/javascript/flavours/glitch/features/ui/index.js
index 6cc1b1cde..c201cd93d 100644
--- a/app/javascript/flavours/glitch/features/ui/index.js
+++ b/app/javascript/flavours/glitch/features/ui/index.js
@@ -320,7 +320,7 @@ class UI extends React.Component {
   }
 
   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 = () => {