Skip to content

Commit

Permalink
fix(extension-image): fix regexp for image filetype (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjie committed Dec 17, 2020
1 parent 4504aad commit 302bdf7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/late-days-tease.md
@@ -0,0 +1,5 @@
---
'@remirror/extension-image': patch
---

Fix regexp for image filetype check
4 changes: 3 additions & 1 deletion packages/@remirror/extension-image/src/image-extension.ts
Expand Up @@ -93,7 +93,9 @@ export class ImageExtension extends NodeExtension {
return false;
}

const images = [...event.dataTransfer.files].filter((file) => /image/i.test(file.type));
const images = [...event.dataTransfer.files].filter((file) =>
/^image\//i.test(file.type),
);

if (images.length === 0) {
return false;
Expand Down

1 comment on commit 302bdf7

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://remirror.io as production
🚀 Deployed on https://5fdbef107a1cd5008c6650c4--remirror.netlify.app

Please sign in to comment.