We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ff42d7 commit 4762179Copy full SHA for 4762179
website/src/page-components/index/App.tsx
@@ -19,12 +19,11 @@ const App = () => {
19
if (!event.clipboardData) return;
20
const items = event.clipboardData.items;
21
for (const item of items) {
22
- if (item.type.indexOf("image") !== -1) {
23
- const blob = item.getAsFile();
24
- const fileURL = URL.createObjectURL(blob!);
25
- setImage(fileURL);
26
- break;
27
- }
+ if (item.type.indexOf("image") === -1) continue;
+ const blob = item.getAsFile();
+ const fileURL = URL.createObjectURL(blob!);
+ setImage(fileURL);
+ return;
28
}
29
};
30
0 commit comments