Skip to content

Commit

Permalink
Replaced methods with array indexing (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton authored Jul 5, 2021
1 parent 30a58b5 commit e1c9851
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function dataTransferItemsHaveFiles(items?: DataTransferItemList) {
function getFileLikes(items: DataTransferItemList) {
const fileLikes: Array<Blob | File> = [];
for (let i = 0; i < items.length; i += 1) {
const item = items.item(i);
const item = items[i];
if (item.kind === 'file') {
const file = item.getAsFile();
if (file) fileLikes.push(file);
Expand All @@ -95,7 +95,7 @@ export async function dataTransferItemsToFiles(items?: DataTransferItemList) {
const blobPromises = [];
const parser = new DOMParser();
for (let i = 0; i < items.length; i += 1) {
const item = items.item(i);
const item = items[i];
if (item.type === 'text/html') {
blobPromises.push(
new Promise((accept) => {
Expand Down

0 comments on commit e1c9851

Please sign in to comment.