From: Hinaloe Date: Sun, 17 Jun 2018 16:10:58 +0000 (+0900) Subject: DataTransfer.types may Array-like object (#7827) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=b347d554326c810b82f4a9d9a7042e41b771967f;p=mastodon.git DataTransfer.types may Array-like object (#7827) --- diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js index f1409b946..3c1a266e3 100644 --- a/app/javascript/mastodon/features/ui/index.js +++ b/app/javascript/mastodon/features/ui/index.js @@ -230,7 +230,7 @@ export default class UI extends React.PureComponent { this.dragTargets.push(e.target); } - if (e.dataTransfer && e.dataTransfer.types.includes('Files')) { + if (e.dataTransfer && Array.from(e.dataTransfer.types).includes('Files')) { this.setState({ draggingOver: true }); } }