Skip to content

Commit

Permalink
Convert an additional array iteration into index iteration.
Browse files Browse the repository at this point in the history
  • Loading branch information
lgarron committed Jan 7, 2024
1 parent c647491 commit fb4aa34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clipboard-polyfill/ClipboardItem/check.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export function hasItemWithType(
clipboardItems: ClipboardItemInterface[],
typeName: string,
): boolean {
for (var i in clipboardItems) {
for (let i = 0; i < clipboardItems.length; i++) {
var item = clipboardItems[i];
if (item.types.indexOf(typeName) !== -1) {
return true;
Expand Down

0 comments on commit fb4aa34

Please sign in to comment.