Simplify unnecessarily complicated loop
This commit is contained in:
1 parent
1fd9a1f689
commit
5f6b89ec2a
1 file changed
+1
-1
@@ -39,7 +39,7 @@ const getAssetTypeForFileExtension = function (fileExtension) {
|
||||
sensitivity: 'accent',
|
||||
usage: 'search'
|
||||
};
|
||||
for (const assetTypeId of Object.keys(storage.AssetType)) {
|
||||
for (const assetTypeId in storage.AssetType) {
|
||||
const assetType = storage.AssetType[assetTypeId];
|
||||
if (fileExtension.localeCompare(assetType.runtimeFormat, compareOptions) === 0) {
|
||||
return assetType;
|
||||
|
||||
Reference in new issue
Block a user