Skip to content

Commit

Permalink
Update getItemType() to work with uppercase as well
Browse files Browse the repository at this point in the history
  • Loading branch information
helamanl0424 authored Apr 12, 2024
1 parent 4074bb8 commit ebac297
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ async function toggleControlPanel(showDefaultButtons) {

function getItemType(itemName) {
if (itemName.endsWith('/')) return 'folder';
if (['.jpg', '.png', '.jpeg'].some(ext => itemName.endsWith(ext))) return 'photo';
if (['.jpg', '.png', '.jpeg'].some(ext => itemName.toLowerCase().endsWith(ext))) return 'photo';
return 'other';
}

Expand Down

0 comments on commit ebac297

Please sign in to comment.